From a81ea6e3fb7e5263b7a3d6272b585f1b04b2260f Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sun, 19 May 2019 01:00:25 -0400 Subject: [PATCH] Fixed events not being deleted properly. --- common/events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/events.c b/common/events.c index 91156081..638193d7 100644 --- a/common/events.c +++ b/common/events.c @@ -104,7 +104,7 @@ int uiEventAddHandler(uiEvent *e, uiEventHandler handler, void *sender, void *da if (e->unusedIDsLen > 0) { h->id = e->unusedIDs[e->unusedIDsLen - 1]; e->unusedIDsLen--; - } else if (e->len == 0) + } else if (e->len != 0) h->id = e->handlers[e->len - 1].id + 1; h->f = handler; h->sender = sender;