e_comp_wl_video: Remove data from list before destroy resource. 78/206178/2
authorSeunghun Lee <shiin.lee@samsung.com>
Wed, 15 May 2019 02:16:37 +0000 (11:16 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 15 May 2019 02:28:59 +0000 (02:28 +0000)
This patch is to silence coverity alarm.

Change-Id: Ib19d764c19af5d5657b80b58ca5ba3183c08f0fe

src/bin/video/e_comp_wl_video.c

index 3d62b19a1bf923f135fc38aa9f4b41c0b367dad6..ad6902864fea381e1817de69ed53a59885954d63 100644 (file)
@@ -176,10 +176,10 @@ _e_video_cb_ec_remove(void *data, int type, void *event)
    video = find_video_with_surface(ec->comp_data->surface);
    if (!video) return ECORE_CALLBACK_PASS_ON;
 
-   _e_video_destroy(video);
-
    video_list = eina_list_remove(video_list, video);
 
+   _e_video_destroy(video);
+
    return ECORE_CALLBACK_PASS_ON;
 }
 
@@ -189,9 +189,9 @@ _e_comp_wl_video_object_destroy(struct wl_resource *resource)
    E_Video *video = wl_resource_get_user_data(resource);
    EINA_SAFETY_ON_NULL_RETURN(video);
 
-   _e_video_destroy(video);
-
    video_list = eina_list_remove(video_list, video);
+
+   _e_video_destroy(video);
 }
 
 static void