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:
Mike Blumenkrantz 2019-07-10 13:57:36 -04:00
parent 8535fe8ca3
commit 7b50b4d991
1 changed files with 1 additions and 1 deletions

View File

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