When binding to data_device manager, if we cannot create the resource

then notify the client and get out.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2013-11-05 08:26:59 +00:00
parent 122a962cfa
commit 41b0eda0d7
1 changed files with 7 additions and 2 deletions

View File

@ -1217,8 +1217,13 @@ _bind_manager(struct wl_client *client, void *data EINA_UNUSED, uint32_t version
struct wl_resource *res;
res = wl_resource_create(client, &wl_data_device_manager_interface, 1, id);
if (res)
wl_resource_set_implementation(res, &_e_manager_interface, NULL, NULL);
if (!res)
{
wl_client_post_no_memory(client);
return;
}
wl_resource_set_implementation(res, &_e_manager_interface, NULL, NULL);
}
static void