From b64b159109d3c082cd2b9470718cac8671cf89f0 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 14 Aug 2015 14:48:43 +0200 Subject: [PATCH] wayland: Avoid warning when switching out into another vt meta_wayland_pointer_get_client_pointer() may be called when the MetaWaylandPointer as been already shut down, so the hash table will be NULL at that moment. --- src/wayland/meta-wayland-pointer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c index 04ba1fb0a..183ea0996 100644 --- a/src/wayland/meta-wayland-pointer.c +++ b/src/wayland/meta-wayland-pointer.c @@ -111,6 +111,8 @@ MetaWaylandPointerClient * meta_wayland_pointer_get_pointer_client (MetaWaylandPointer *pointer, struct wl_client *client) { + if (!pointer->pointer_clients) + return NULL; return g_hash_table_lookup (pointer->pointer_clients, client); }