[PATCH] tests: fix bad arguments when posting event
Marek Ch
mchqwerty at gmail.com
Wed Nov 20 07:25:38 PST 2013
I was getting SIGSEGV in resources-test (arch linux, gcc 4.8.2) due
to bad (no) arguments passed to wl_resource_post_event().
Although the event is not invoked it crashed in serialize_closure
when handling arguments
---
tests/resources-test.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/resources-test.c b/tests/resources-test.c
index d7a428a..9c1bb1f 100644
--- a/tests/resources-test.c
+++ b/tests/resources-test.c
@@ -108,7 +108,8 @@ TEST(destroy_res_tst)
wl_resource_add_destroy_listener(res, &destroy_listener);
/* without implementation this should be ignored .. */
- wl_resource_post_event(res, 0);
+ wl_resource_post_event(res, WL_DISPLAY_ERROR, 0,
+ "This error will be ignored");
id = wl_resource_get_id(res);
link = wl_resource_get_link(res);
--
1.8.4.2
More information about the wayland-devel
mailing list