client: Don't segfault when receiving error on destroyed object
authorJonas Ådahl <jadahl@gmail.com>
Mon, 22 Feb 2016 05:37:26 +0000 (13:37 +0800)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 26 Feb 2016 09:55:17 +0000 (11:55 +0200)
commit25fcb88a269a434196cf89df835ba6326bacacab
tree2640485f1a68ec344ebb6ae675ae99a98fe56b98
parentcde251a124d41977b447098cc530fcad2834a45f
client: Don't segfault when receiving error on destroyed object

If an error is received on a destroyed object, we'd get NULL passed
to display_handle_error() instead of a pointer to a valid wl_proxy.

The logging is changed to report [unknown interface] and [unknown id]
instead of the actual interface name and id.

The wl_display_get_protocol_error() documentation is updated to handle
the situation. For when the proxy was NULL, the object id 0 and
interface NULL is written.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
[Pekka: changed the error message wording]
Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Acked-by: Jonas Ådahl <jadahl@gmail.com>
src/wayland-client.c