zmike pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=65c47edc3dafee089507198f395a973767878c19

commit 65c47edc3dafee089507198f395a973767878c19
Author: Mike Blumenkrantz <zm...@samsung.com>
Date:   Wed Jul 10 13:57:38 2019 -0400

    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
---
 src/lib/ecore/ecore_event_message_handler.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
 {
    Handler *h;
 
-   EINA_SAFETY_ON_TRUE_RETURN_VAL((type < 0) || (type > pd->event_type_count) 
|| (!func), 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;

-- 


Reply via email to