From 93a125b7a298ae8819ba04ed065c72188404e586 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Mon, 24 Nov 2014 16:00:20 -0500 Subject: [PATCH] e-comp-wl: Don't try to set null data if we don't have a surface Summary: This fixes an issue where calling wl_resource_set_user_data with an invalid resource would cause an abort in the wayland libraries, Thus making E crash. @fix Signed-off-by: Chris Michael --- src/bin/e_comp_wl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 7999ab85a..69483397d 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -2050,7 +2050,8 @@ _e_comp_wl_client_cb_del(void *data EINA_UNUSED, E_Client *ec) /* the client is getting deleted, which means the pixmap will be getting * freed. We need to unset the surface user data */ - wl_resource_set_user_data(ec->comp_data->surface, NULL); + if (ec->comp_data->surface) + wl_resource_set_user_data(ec->comp_data->surface, NULL); if (ec->comp_data->pending.opaque) eina_tiler_free(ec->comp_data->pending.opaque);