forked from enlightenment/efl
ecore: throw an error when trying to register a handler for a nonexistent event type
Summary: this should not be a silent return since event handlers are depended upon so heavily Depends on D9254 Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9255
This commit is contained in:
parent
2138010127
commit
1feff299ff
|
@ -147,7 +147,7 @@ _ecore_event_message_handler_handler_add(Eo *obj EINA_UNUSED, Ecore_Event_Messag
|
|||
{
|
||||
Handler *h;
|
||||
|
||||
if ((type < 0) || (type > pd->event_type_count) || (!func)) return NULL;
|
||||
EINA_SAFETY_ON_TRUE_RETURN_VAL((type < 0) || (type > pd->event_type_count) || (!func), NULL);
|
||||
h = calloc(1, sizeof(Handler));
|
||||
if (!h) return NULL;
|
||||
h->func = func;
|
||||
|
|
Loading…
Reference in New Issue