connection: abort if a listener function is NULL

Signed-off-by: Ryo Munakata <ryomnktml@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
Ryo Munakata 2014-10-01 21:17:18 +09:00 committed by Pekka Paalanen
parent 9d327c5796
commit 47c752ad82

View file

@ -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);
}