Fixed events not being deleted properly.

This commit is contained in:
Pietro Gagliardi 2019-05-19 01:00:25 -04:00
parent 973696137f
commit a81ea6e3fb
1 changed files with 1 additions and 1 deletions

View File

@ -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;