Eina_List *ee_rendered_hw_list = (Eina_List *)data;
E_Hwc_Window *hwc_window = NULL;
- EINA_LIST_FREE(ee_rendered_hw_list, hwc_window)
- e_object_unref(E_OBJECT(hwc_window));
+ if (eina_list_count(ee_rendered_hw_list))
+ {
+ EINA_LIST_FREE(ee_rendered_hw_list, hwc_window)
+ e_object_unref(E_OBJECT(hwc_window));
+ }
}
/* gets called as somebody modifies target_window's queue */
{
WRN("flush_post_cb is called but tsurface isn't dequeued");
- EINA_LIST_FREE(target_hwc_window->ee_rendered_hw_list, hwc_window)
- e_object_unref(E_OBJECT(hwc_window));
+ if (eina_list_count(target_hwc_window->ee_rendered_hw_list))
+ {
+ EINA_LIST_FREE(target_hwc_window->ee_rendered_hw_list, hwc_window)
+ e_object_unref(E_OBJECT(hwc_window));
+ }
target_hwc_window->ee_rendered_hw_list = NULL;
return;
if (!_e_hwc_windows_visible_windows_changed_check(hwc, visible_windows, visible_num))
return EINA_FALSE;
- EINA_LIST_FREE(hwc->visible_windows, hwc_window)
- e_object_unref(E_OBJECT(hwc_window));
+ if (eina_list_count(hwc->visible_windows))
+ {
+ EINA_LIST_FREE(hwc->visible_windows, hwc_window)
+ e_object_unref(E_OBJECT(hwc_window));
+ }
/* store the current visible windows and the number of them */
hwc->visible_windows = eina_list_clone(visible_windows);