From 6de2e6d9ce2ab3d076ac667dc875e8fd71b919fa Mon Sep 17 00:00:00 2001 From: Determinant Date: Tue, 28 Aug 2018 20:17:23 -0400 Subject: ... --- include/salticidae/event.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/salticidae/event.h b/include/salticidae/event.h index 0537a80..5b41d9e 100644 --- a/include/salticidae/event.h +++ b/include/salticidae/event.h @@ -108,7 +108,8 @@ class Event { void add() { if (ev) event_add(ev, nullptr); } void del() { if (ev) event_del(ev); } void add_with_timeout(double timeout) { - event_add_with_timeout(ev, timeout); + if (ev) + event_add_with_timeout(ev, timeout); } operator bool() const { return ev != nullptr; } -- cgit v1.2.3-70-g09d2