evas-object-main: Fix potential null dereference

Coverity reports that EVAS_OBJECT_DATA_SAFE_GET returns NULL here (184
out of 188 times). As such, we should not be calling
_event_animation_object_get with a null object so add a null check here.

Fixes Coverity CID1381713

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2017-11-06 10:17:29 -05:00
parent 6c76fdb824
commit 12947e01e8
1 changed files with 2 additions and 0 deletions

View File

@ -2829,6 +2829,8 @@ _efl_canvas_object_event_animation_is_running(Eo *eo_obj,
{
Evas_Object_Protected_Data *obj = EVAS_OBJECT_DATA_SAFE_GET(eo_obj);
if (!obj) return EINA_FALSE;
if (_event_animation_object_get(obj, desc))
return EINA_TRUE;