wayland: Fix crash when attempting to create surfaces for deleted clients

Internal clients can be deleted by keybind before the surface create
callback fires resulting in a NULL pointer dereference.
This commit is contained in:
Derek Foreman 2016-04-25 16:40:32 -05:00 committed by Mike Blumenkrantz
parent 4c311d301e
commit 5d1dfdf33e
1 changed files with 2 additions and 0 deletions

View File

@ -1443,6 +1443,8 @@ _e_comp_wl_compositor_cb_surface_create(struct wl_client *client, struct wl_reso
DBG("Compositor Cb Surface Create: %d", id);
if (e_object_is_del(E_OBJECT(ec))) return;
/* try to create an internal surface */
if (!(res = wl_resource_create(client, &wl_surface_interface,
wl_resource_get_version(resource), id)))