eo_base_class: fixed possible null dereference 22/275622/2
authorMichal Szczecinski <m.szczecinsk@partner.samsung.com>
Fri, 27 May 2022 08:30:00 +0000 (10:30 +0200)
committerChun <jykeon@samsung.com>
Mon, 30 May 2022 02:50:43 +0000 (02:50 +0000)
Change-Id: I399b323d23610daf51becd878bac24ae0b38847d

src/lib/eo/eo_base_class.c

index 52c5ca9..ebdb596 100644 (file)
@@ -2050,7 +2050,7 @@ _event_callback_call(Eo *obj_id, Efl_Object_Data *pd,
       .generation = 1,
    };
    Eina_Bool need_hash = EINA_TRUE;
-
+   if (pd == NULL || pd->callbacks == NULL) return EINA_FALSE;
    if (pd->callbacks_count == 0) return EINA_TRUE;
    else EFL_OBJECT_EVENT_CALLBACK_BLOCK(pd, desc, EFL_EVENT_CALLBACK_ADD, need_hash)
    else EFL_OBJECT_EVENT_CALLBACK_BLOCK(pd, desc, EFL_EVENT_CALLBACK_DEL, need_hash)