aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2012-03-17 18:24:07 +0000
committerNicholas Marriott <nicm@openbsd.org>2012-03-17 18:24:07 +0000
commitd3c842d3678e52275c944123f00a2a974eb5d965 (patch)
treed0b234a4364504e17f53d90aa3e635134c0f01cc /window.c
parenta597e3546cf667c2db91aea5545d2cb2125366f5 (diff)
downloadrtmux-d3c842d3678e52275c944123f00a2a974eb5d965.tar.gz
rtmux-d3c842d3678e52275c944123f00a2a974eb5d965.tar.bz2
rtmux-d3c842d3678e52275c944123f00a2a974eb5d965.zip
Check event_initialized before event_del if event may not have been set
up; libevent2 complains about this. Reported by Moriyoshi Koizumi.
Diffstat (limited to 'window.c')
-rw-r--r--window.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/window.c b/window.c
index 0489d105..f0061293 100644
--- a/window.c
+++ b/window.c
@@ -350,7 +350,8 @@ window_destroy(struct window *w)
if (w->layout_root != NULL)
layout_free(w);
- evtimer_del(&w->name_timer);
+ if (event_initialized(&w->name_timer))
+ evtimer_del(&w->name_timer);
options_free(&w->options);