diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2012-03-17 18:24:07 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2012-03-17 18:24:07 +0000 |
commit | d3c842d3678e52275c944123f00a2a974eb5d965 (patch) | |
tree | d0b234a4364504e17f53d90aa3e635134c0f01cc /status.c | |
parent | a597e3546cf667c2db91aea5545d2cb2125366f5 (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 'status.c')
-rw-r--r-- | status.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -776,7 +776,8 @@ status_message_set(struct client *c, const char *fmt, ...) tv.tv_sec = delay / 1000; tv.tv_usec = (delay % 1000) * 1000L; - evtimer_del(&c->message_timer); + if (event_initialized (&c->message_timer)) + evtimer_del(&c->message_timer); evtimer_set(&c->message_timer, status_message_callback, c); evtimer_add(&c->message_timer, &tv); |