aboutsummaryrefslogtreecommitdiff
path: root/names.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2012-08-21 10:00:33 +0000
committerNicholas Marriott <nicm@openbsd.org>2012-08-21 10:00:33 +0000
commit58e8e0eac841d6d337de3da4e2f81665c3cd3faa (patch)
tree512efdef7e6cc33d659c2de5fdeb0c2a75eb71c4 /names.c
parenta1e4908ed7d14c5b406541144017d57db4750c56 (diff)
downloadrtmux-58e8e0eac841d6d337de3da4e2f81665c3cd3faa.tar.gz
rtmux-58e8e0eac841d6d337de3da4e2f81665c3cd3faa.tar.bz2
rtmux-58e8e0eac841d6d337de3da4e2f81665c3cd3faa.zip
Fix up window reference counting and don't crash if the rename timer
fires while the window is dead but still referenced. Fixes problem reported by Michael Scholz.
Diffstat (limited to 'names.c')
-rw-r--r--names.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/names.c b/names.c
index de4b30cc..46708bce 100644
--- a/names.c
+++ b/names.c
@@ -50,6 +50,9 @@ window_name_callback(unused int fd, unused short events, void *data)
struct window *w = data;
char *name, *wname;
+ if (w->active == NULL)
+ return;
+
if (!options_get_number(&w->options, "automatic-rename")) {
if (event_initialized(&w->name_timer))
event_del(&w->name_timer);