summaryrefslogtreecommitdiff
path: root/src/lib/ecore
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-07-10 13:57:38 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-07-10 13:57:38 -0400
commit65c47edc3dafee089507198f395a973767878c19 (patch)
tree3aaebfe802b66e164071f69f09e9704ab9604cd2 /src/lib/ecore
parent1feff299ffabf7df6ab57cfea23b564ce59c66ec (diff)
ecore: also error when trying to add an event handler for a type 0 event
Summary: this is not a valid event type to add a handler for, it indicates an uninitialized event which means the component is not active and everything will break @fix Depends on D9255 Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9256
Diffstat (limited to 'src/lib/ecore')
-rw-r--r--src/lib/ecore/ecore_event_message_handler.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ecore/ecore_event_message_handler.c b/src/lib/ecore/ecore_event_message_handler.c
index 0ab05b4c74..ff6a3412f4 100644
--- a/src/lib/ecore/ecore_event_message_handler.c
+++ b/src/lib/ecore/ecore_event_message_handler.c
@@ -147,7 +147,7 @@ _ecore_event_message_handler_handler_add(Eo *obj EINA_UNUSED, Ecore_Event_Messag
147{ 147{
148 Handler *h; 148 Handler *h;
149 149
150 EINA_SAFETY_ON_TRUE_RETURN_VAL((type < 0) || (type > pd->event_type_count) || (!func), NULL); 150 EINA_SAFETY_ON_TRUE_RETURN_VAL((type <= 0) || (type > pd->event_type_count) || (!func), NULL);
151 h = calloc(1, sizeof(Handler)); 151 h = calloc(1, sizeof(Handler));
152 if (!h) return NULL; 152 if (!h) return NULL;
153 h->func = func; 153 h->func = func;