Change-Id: Iddd747c44044f54c57ff04d66583bc00ccbf9ee1
Signed-off-by: MinJeong Kim <minjjj.kim@samsung.com>
static void
_e_plane_ev_free(void *d EINA_UNUSED, E_Event_Plane_Win_Change *ev)
{
- if (ev->ec) e_object_unref(E_OBJECT(ev->ec));
+ if (ev->ec)
+ e_object_unref(E_OBJECT(ev->ec));
E_FREE(ev);
}
ev->ep = ep;
ev->ec = ep->ec;
- if ((ep->ec) && (!e_object_is_del(E_OBJECT(ep->ec))))
- e_object_ref(E_OBJECT(ep->ec));
+ if ((ep->ec) && (e_object_is_del(ep->ec)))
+ ev->ec = NULL;
+
+ if (ev->ec)
+ e_object_ref(E_OBJECT(ev->ec));
ecore_event_add(type, ev, (Ecore_End_Cb)_e_plane_ev_free, NULL);