diff options
author | 2012-08-21 10:00:33 +0000 | |
---|---|---|
committer | 2012-08-21 10:00:33 +0000 | |
commit | a3560846b7ac3804af977f8d56c2f5d1e61e00c3 (patch) | |
tree | b08ba1620dfd97848587458439f641e17c077452 /usr.bin/tmux/names.c | |
parent | Sort options. (diff) | |
download | wireguard-openbsd-a3560846b7ac3804af977f8d56c2f5d1e61e00c3.tar.xz wireguard-openbsd-a3560846b7ac3804af977f8d56c2f5d1e61e00c3.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 'usr.bin/tmux/names.c')
-rw-r--r-- | usr.bin/tmux/names.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/tmux/names.c b/usr.bin/tmux/names.c index 290946c94ab..7430a345d42 100644 --- a/usr.bin/tmux/names.c +++ b/usr.bin/tmux/names.c @@ -1,4 +1,4 @@ -/* $OpenBSD: names.c,v 1.16 2012/07/10 11:53:01 nicm Exp $ */ +/* $OpenBSD: names.c,v 1.17 2012/08/21 10:00:33 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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); |