wayland/pointer: Check for surface resource

Like we do in several other places since
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1880

Closes https://gitlab.gnome.org/GNOME/mutter/-/issues/2645

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2869>
This commit is contained in:
Robert Mader 2023-02-25 19:14:22 +01:00
parent 1b52926031
commit 6b84f5bd00

View File

@ -1068,7 +1068,7 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
pointer->focus_surface = NULL; pointer->focus_surface = NULL;
} }
if (surface != NULL) if (surface != NULL && surface->resource != NULL)
{ {
struct wl_client *client = wl_resource_get_client (surface->resource); struct wl_client *client = wl_resource_get_client (surface->resource);