[mutter] wayland: Avoid warning when switching out into another vt



commit b64b159109d3c082cd2b9470718cac8671cf89f0
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Aug 14 14:48:43 2015 +0200

    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 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/wayland/meta-wayland-pointer.c b/src/wayland/meta-wayland-pointer.c
index 04ba1fb..183ea09 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);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]