summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2023-03-27 21:36:19 +0200
committerJonas Ådahl <jadahl@gmail.com>2023-04-13 21:02:03 +0200
commit697b99ee13ed31860fcf7f05bb3eba402e16612c (patch)
tree1bba524f8ff617aea77ef78324236620673782d4
parentf744acefee25bfb54ceb75e9a21cbcaeb58da40c (diff)
downloadmutter-697b99ee13ed31860fcf7f05bb3eba402e16612c.tar.gz
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>
-rw-r--r--src/wayland/meta-wayland-xdg-shell.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wayland/meta-wayland-xdg-shell.c b/src/wayland/meta-wayland-xdg-shell.c
index 1140587ed..2fa1a0e1c 100644
--- a/src/wayland/meta-wayland-xdg-shell.c
+++ b/src/wayland/meta-wayland-xdg-shell.c
@@ -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));