diff options
author | Bernd Weimer <[email protected]> | 2025-05-05 11:17:45 +0200 |
---|---|---|
committer | Bernd Weimer <[email protected]> | 2025-05-22 15:21:44 +0200 |
commit | 28d442761a00e69d821bc7d49a3e5b355aa5e1e0 (patch) | |
tree | c282c23ada41f2c5223812923792f6a663c3a101 | |
parent | e0087a1347b690d4360dba4455764ac1a778d9c8 (diff) |
A ShellSurfaceItem w/o an actual shellSurface assigned could cause a
crash in function onTop/Bottom.
Pick-to: 6.9 6.8
Change-Id: I17ae836c61d09e7cb646c6485f4854b3535840e9
Reviewed-by: Eskil Abrahamsen Blomfeldt <[email protected]>
-rw-r--r-- | src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp b/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp index 479dea8de..e2bbd996b 100644 --- a/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp +++ b/src/compositor/extensions/qwaylandquickshellsurfaceitem.cpp @@ -310,12 +310,12 @@ static QWaylandQuickShellSurfaceItem *findSurfaceItemFromMoveItem(QQuickItem *mo static inline bool onTop(QWaylandQuickShellSurfaceItem *surf) { - return surf->staysOnTop() || surf->shellSurface()->isModal(); + return surf->staysOnTop() || (surf->shellSurface() && surf->shellSurface()->isModal()); } static inline bool onBottom(QWaylandQuickShellSurfaceItem *surf) { - return surf->staysOnBottom() && !surf->shellSurface()->isModal(); + return surf->staysOnBottom() && !(surf->shellSurface() && surf->shellSurface()->isModal()); } /* |