forked from enlightenment/enlightenment
Fix wayland deferred buffer free crash
We'd sometimes get a stale pointer when doing a deferred buffer free.
This commit is contained in:
parent
a3f2752fe0
commit
9f3de5e346
|
@ -781,14 +781,13 @@ e_pixmap_image_clear(E_Pixmap *cp, Eina_Bool cache)
|
||||||
break;
|
break;
|
||||||
case E_PIXMAP_TYPE_WL:
|
case E_PIXMAP_TYPE_WL:
|
||||||
#ifdef HAVE_WAYLAND
|
#ifdef HAVE_WAYLAND
|
||||||
|
_e_pixmap_wl_buffers_free(cp);
|
||||||
if (cache)
|
if (cache)
|
||||||
{
|
{
|
||||||
E_Comp_Wl_Client_Data *cd;
|
E_Comp_Wl_Client_Data *cd;
|
||||||
struct wl_resource *cb;
|
struct wl_resource *cb;
|
||||||
Eina_List *free_list;
|
Eina_List *free_list;
|
||||||
|
|
||||||
if (!e_comp->rendering) _e_pixmap_wl_buffers_free(cp);
|
|
||||||
|
|
||||||
if ((!cp->client) || (!cp->client->comp_data)) return;
|
if ((!cp->client) || (!cp->client->comp_data)) return;
|
||||||
cd = (E_Comp_Wl_Client_Data *)cp->client->comp_data;
|
cd = (E_Comp_Wl_Client_Data *)cp->client->comp_data;
|
||||||
|
|
||||||
|
@ -803,8 +802,6 @@ e_pixmap_image_clear(E_Pixmap *cp, Eina_Bool cache)
|
||||||
wl_resource_destroy(cb);
|
wl_resource_destroy(cb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
_e_pixmap_wl_buffers_free(cp);
|
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue