e_hwc_window: add checking deleted before get ec 05/202805/4
authorChangyeon Lee <cyeon.lee@samsung.com>
Thu, 4 Apr 2019 08:49:12 +0000 (17:49 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Thu, 11 Apr 2019 06:42:54 +0000 (15:42 +0900)
Change-Id: Ia925ffb61ca8beddd376b48cbae76aae8539964c

src/bin/e_hwc_window.c

index ed4e0a2..6341e4c 100644 (file)
@@ -1346,9 +1346,9 @@ e_hwc_window_device_state_available_get(E_Hwc_Window *hwc_window)
 EINTERN Eina_Bool
 e_hwc_window_device_state_available_update(E_Hwc_Window *hwc_window)
 {
-   E_Client *ec;
-   E_Comp_Wl_Client_Data *cdata;
-   E_Output *eout;
+   E_Client *ec = NULL;
+   E_Comp_Wl_Client_Data *cdata = NULL;
+   E_Output *eout = NULL;
    int minw = 0, minh = 0;
    int transform;
    Eina_Bool available = EINA_TRUE;
@@ -1356,6 +1356,13 @@ e_hwc_window_device_state_available_update(E_Hwc_Window *hwc_window)
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window, EINA_FALSE);
 
+   if (hwc_window->is_deleted)
+     {
+        restriction = "deleted";
+        available = EINA_FALSE;
+        goto finish;
+     }
+
    ec = hwc_window->ec;
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
 
@@ -1496,9 +1503,12 @@ e_hwc_window_device_state_available_update(E_Hwc_Window *hwc_window)
      }
 
 finish:
-   if (!available && evas_object_visible_get(ec->frame))
-     EHWTRACE("   -- {%25s} is forced to set CL state.(%s)",
-              hwc_window->ec, hwc_window, ec->icccm.title, restriction);
+   if (!available && ec)
+     {
+        if (evas_object_visible_get(ec->frame))
+          EHWTRACE("   -- {%25s} is forced to set CL state.(%s)",
+                   hwc_window->ec, hwc_window, ec->icccm.title, restriction);
+     }
 
    if (hwc_window->device_state_available == available) return EINA_FALSE;
 
@@ -1656,6 +1666,8 @@ e_hwc_window_rendered_window_update(E_Hwc_Window *hwc_window)
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window, EINA_FALSE);
 
+   if (hwc_window->is_deleted) return EINA_TRUE;
+
    ec = hwc_window->ec;
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);
 
@@ -1956,6 +1968,8 @@ e_hwc_window_pp_rendered_window_update(E_Hwc_Window *hwc_window)
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window, EINA_FALSE);
 
+   if (hwc_window->is_deleted) return EINA_TRUE;
+
    ec = hwc_window->ec;
    EINA_SAFETY_ON_NULL_RETURN_VAL(ec, EINA_FALSE);