aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2018-08-28 20:17:23 -0400
committerDeterminant <[email protected]>2018-08-28 20:17:23 -0400
commit6de2e6d9ce2ab3d076ac667dc875e8fd71b919fa (patch)
tree48f4ec7a35e9d5b93e9bfe9b76f3a8d80e1a7e82
parent4f5b1b8257a2d342446f7d4a51427d14cb2a2b14 (diff)
...
-rw-r--r--include/salticidae/event.h3
1 files changed, 2 insertions, 1 deletions
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; }