video: move a code chekcing whther e_client is deleted to entry of creation 37/182637/2
authorSeunghun Lee <shiin.lee@samsung.com>
Wed, 20 Jun 2018 04:58:09 +0000 (13:58 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 27 Jun 2018 02:29:53 +0000 (02:29 +0000)
Change-Id: Ibf64d9fb7dfc243fdb42d2ffb65ee8405a36b602

src/bin/e_comp_wl_video.c

index e42aa53..dba5f6e 100644 (file)
@@ -2127,6 +2127,7 @@ _e_video_create(struct wl_resource *video_object, struct wl_resource *surface)
 
    ec = wl_resource_get_user_data(surface);
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, NULL);
+   EINA_SAFETY_ON_TRUE_RETURN_VAL(e_object_is_del(E_OBJECT(ec)), NULL);
 
    video = calloc(1, sizeof *video);
    EINA_SAFETY_ON_NULL_RETURN_VAL(video, NULL);
@@ -2156,10 +2157,6 @@ _e_video_set(E_Video *video, E_Client *ec)
    const tdm_prop *props;
    tdm_error tdm_err = TDM_ERROR_NONE;
 
-   /* TODO Consider to move this check code where the entry of creation of
-    * video_object */
-   EINA_SAFETY_ON_TRUE_RETURN(e_object_is_del(E_OBJECT(ec)));
-
    video->ec = ec;
    video->window = e_client_util_win_get(ec);