wayland/surface: Check for surface role in meta_wayland_surface_get_window()
The function can get called without valid surface role, e.g. from `zwp_xwayland_keyboard_grab_manager_grab()`. Debugged by @piegamesde Fixes https://gitlab.gnome.org/GNOME/mutter/-/issues/1147
This commit is contained in:
parent
2907ee93cc
commit
dbe919ef92
@ -1745,6 +1745,9 @@ meta_wayland_surface_role_get_window (MetaWaylandSurfaceRole *surface_role)
|
||||
MetaWindow *
|
||||
meta_wayland_surface_get_window (MetaWaylandSurface *surface)
|
||||
{
|
||||
if (!surface->role)
|
||||
return NULL;
|
||||
|
||||
return meta_wayland_surface_role_get_window (surface->role);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user