commit 5f7077b
Michael Forney
·
2014-01-21 04:37:56 +0000 UTC
parent 3f17844
output: Check to make sure resource creation succeeds
1 files changed,
+7,
-0
+7,
-0
1@@ -24,6 +24,13 @@ static void bind_output(struct wl_client * client, void * data,
2 version = 2;
3
4 resource = wl_resource_create(client, &wl_output_interface, version, id);
5+
6+ if (!resource)
7+ {
8+ wl_client_post_no_memory(client);
9+ return;
10+ }
11+
12 wl_resource_set_implementation(resource, NULL, output,
13 &swc_remove_resource);
14 wl_list_insert(&output->resources, wl_resource_get_link(resource));