and post client_no_memory if is...
---
tests/weston-test.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tests/weston-test.c b/tests/weston-test.c
index 44875a6..cc937e5 100644
--- a/tests/weston-test.c
+++ b/tests/weston-test.c
@@ -260,6 +260,11 @@ bind_test(struct wl_client *client, void *data, uint32_t
version, uint32_t id)
struct wl_resource *resource;
resource = wl_resource_create(client, &wl_test_interface, 1, id);
+ if (!resource) {
+ wl_client_post_no_memory(client);
+ return;
+ }
+
wl_resource_set_implementation(resource,
&test_implementation, test, NULL);
--
2.0.1
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel