summaryrefslogtreecommitdiffstats
path: root/names.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 /names.c
parenta597e3546cf667c2db91aea5545d2cb2125366f5 (diff)
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 'names.c')
-rw-r--r--names.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/names.c b/names.c
index a1fc1ba3..5821d94a 100644
--- a/names.c
+++ b/names.c
@@ -36,7 +36,8 @@ queue_window_name(struct window *w)
tv.tv_sec = 0;
tv.tv_usec = NAME_INTERVAL * 1000L;
- evtimer_del(&w->name_timer);
+ if (event_initialized(&w->name_timer))
+ evtimer_del(&w->name_timer);
evtimer_set(&w->name_timer, window_name_callback, w);
evtimer_add(&w->name_timer, &tv);
}