wayland/xdg-shell: Ignore reposition if popup was dismissed

If the popup was dismissed (i.e. has no MetaWindow anymore), it'll also
have no parent surface. With no parent surface, we'd try to fetch a
transaction from NULL and crash, but if we don't try if we were
dismissed, we won't reach here anyway.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2940>
This commit is contained in:
Jonas Ådahl 2023-03-27 21:36:19 +02:00
parent f744acefee
commit 697b99ee13

View File

@ -642,6 +642,9 @@ xdg_popup_reposition (struct wl_client *client,
MetaWaylandXdgPositioner *xdg_positioner;
MetaWaylandTransaction *transaction;
if (!meta_wayland_surface_get_window (surface))
return;
xdg_positioner = g_memdup2 (wl_resource_get_user_data (positioner_resource),
sizeof (MetaWaylandXdgPositioner));