aboutsummaryrefslogtreecommitdiff
path: root/names.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2012-08-31 09:22:08 +0000
committerTiago Cunha <tcunha@gmx.com>2012-08-31 09:22:08 +0000
commit56e37487a81f07b4c8f409e72dea6c5b746de4b3 (patch)
tree224cea806ff14efaa70bff628a268c5572a5c7ea /names.c
parent674545f7e6fc703a809d60b572e1a99d0777d6f2 (diff)
downloadrtmux-56e37487a81f07b4c8f409e72dea6c5b746de4b3.tar.gz
rtmux-56e37487a81f07b4c8f409e72dea6c5b746de4b3.tar.bz2
rtmux-56e37487a81f07b4c8f409e72dea6c5b746de4b3.zip
Sync OpenBSD patchset 1165:
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 11baae35..b86d1b01 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);