[PATCH wayland v3] abort if a listener function is NULL

Pekka Paalanen ppaalanen at gmail.com
Wed Nov 12 04:05:24 PST 2014


On Wed,  1 Oct 2014 21:17:18 +0900
Ryo Munakata <ryomnktml at gmail.com> wrote:

> Signed-off-by: Ryo Munakata <ryomnktml at gmail.com>
> ---
>  src/connection.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/src/connection.c b/src/connection.c
> index f292853..f516c85 100644
> --- a/src/connection.c
> +++ b/src/connection.c
> @@ -931,6 +931,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);
>  }
>  

Pushed.

Thanks,
pq


More information about the wayland-devel mailing list