summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2020-12-07 20:03:24 +0800
committerMatt Johnston <matt@ucc.asn.au>2020-12-07 20:03:24 +0800
commita6b2eeb190f19b00931be76d43538d03178db728 (patch)
tree2675dad90cc42588028066f3c1794a6ee52a5d60
parente12ff23e7d530613f7e876d366b52d04072a0e06 (diff)
Fix null pointer dereference removing listeners
-rw-r--r--listener.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/listener.c b/listener.c
index 9cccefc..4c60589 100644
--- a/listener.c
+++ b/listener.c
@@ -139,7 +139,7 @@ struct Listener * get_listener(int type, const void* typedata,
struct Listener* listener;
for (i = 0, listener = ses.listeners[i]; i < ses.listensize; i++) {
- if (listener->type == type
+ if (listener && listener->type == type
&& match(typedata, listener->typedata)) {
return listener;
}