evas: Fix crash when object is not fully created
authorJean-Philippe Andre <jp.andre@samsung.com>
Fri, 13 Oct 2017 05:29:15 +0000 (14:29 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Fri, 13 Oct 2017 05:29:15 +0000 (14:29 +0900)
This fixes make check.

src/lib/evas/canvas/evas_object_main.c

index 45b4790..a6f9471 100644 (file)
@@ -2739,6 +2739,9 @@ _efl_canvas_object_event_animation_set(Eo *eo_obj,
    if (!_efl_animation_event_type_is_valid(event_type))
      return;
 
+   // This may happen if the object never was fully created.
+   if (!pd->event_anims) return;
+
    Event_Animation *event_anim =
       eina_array_data_get(pd->event_anims, event_type);
    if (!event_anim) return;