e_plane: match ref/unref of ec 31/213631/2 accepted/tizen/unified/20190911.111600 submit/tizen/20190910.052341
authorMinJeong Kim <minjjj.kim@samsung.com>
Mon, 9 Sep 2019 09:04:14 +0000 (18:04 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Tue, 10 Sep 2019 05:24:57 +0000 (05:24 +0000)
Change-Id: Iddd747c44044f54c57ff04d66583bc00ccbf9ee1
Signed-off-by: MinJeong Kim <minjjj.kim@samsung.com>
src/bin/e_plane.c

index 4ac96fd3a10a9fea53cfc342575ec0b279343d04..ac355cb414d1f4aaaf3db35476a11e89caf821fc 100644 (file)
@@ -180,7 +180,8 @@ _e_plane_surface_unset(E_Plane *plane)
 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);
 }
 
@@ -197,8 +198,11 @@ _e_plane_ev(E_Plane *ep, int type)
    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);