aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--binding/iiodevices-binding.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/binding/iiodevices-binding.c b/binding/iiodevices-binding.c
index b5a7588..e48a26a 100644
--- a/binding/iiodevices-binding.c
+++ b/binding/iiodevices-binding.c
@@ -100,7 +100,7 @@ static struct afb_event* event_add(const char *tag)
/* make the event */
e->event = afb_daemon_make_event(tag);
- if (!e->event.closure) { free(e); return NULL; }
+ if (!afb_event_is_valid(e->event)) { free(e); return NULL; }
/* link */
e->next = events;