From 47c752ad82d4475d6f4f605423c93bb29e679bf8 Mon Sep 17 00:00:00 2001 From: Ryo Munakata Date: Wed, 1 Oct 2014 21:17:18 +0900 Subject: [PATCH] connection: abort if a listener function is NULL Signed-off-by: Ryo Munakata Reviewed-by: Pekka Paalanen --- src/connection.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/connection.c b/src/connection.c index f9f2474..2545194 100644 --- a/src/connection.c +++ b/src/connection.c @@ -934,6 +934,11 @@ wl_closure_invoke(struct wl_closure *closure, uint32_t flags, count + 2, &ffi_type_void, ffi_types); implementation = target->implementation; + if (!implementation[opcode]) { + wl_log("listener function for opcode %u of %s is NULL\n", + opcode, target->interface->name); + abort(); + } ffi_call(&cif, implementation[opcode], NULL, ffi_args); } -- 2.7.4