mirror of
https://github.com/brl/mutter.git
synced 2025-02-08 17:44:09 +00:00
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 *
|
MetaWindow *
|
||||||
meta_wayland_surface_get_window (MetaWaylandSurface *surface)
|
meta_wayland_surface_get_window (MetaWaylandSurface *surface)
|
||||||
{
|
{
|
||||||
|
if (!surface->role)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
return meta_wayland_surface_role_get_window (surface->role);
|
return meta_wayland_surface_role_get_window (surface->role);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user