e-comp-wl: Don't crash if we fail to create a new e_client

This "should" fix T2344 crashing, however I suppose a better question
is ... why is e_client_new returning NULL when it Does find the client
already in the hash...

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-04-21 09:36:00 -04:00
parent 90fe5a4d0d
commit 9b7358aa32
1 changed files with 7 additions and 5 deletions

View File

@ -1395,11 +1395,13 @@ _e_comp_wl_compositor_cb_surface_create(struct wl_client *client, struct wl_reso
}
DBG("\tUsing Pixmap: %p", ep);
ec = e_client_new(ep, 0, 0);
ec->new_client = 0;
e_comp->new_clients--;
ec->client.w = ec->client.h = 1;
ec->ignored = 1;
if ((ec = e_client_new(ep, 0, 0)))
{
ec->new_client = 0;
e_comp->new_clients--;
ec->client.w = ec->client.h = 1;
ec->ignored = 1;
}
/* set reference to pixmap so we can fetch it later */
wl_resource_set_user_data(res, ep);