diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2018-12-21 15:24:49 +0100 |
---|---|---|
committer | Johan Helsing <johan.helsing@qt.io> | 2019-04-02 12:40:48 +0000 |
commit | f602191778cce57a67fdeffe5f3cc0e1cd2c7b53 (patch) | |
tree | 4a9c064973c2e12d7306fb9370c56543ace8a50a /src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5.cpp | |
parent | 7a0956a89a559e5a73a659fcc08001cefa01d9bd (diff) |
Client xdg-shell v5: Fix crash when creating a popup without a valid parent
Fixes: QTBUG-72696
Change-Id: I43f0a02a4447238aa93142981d22597c452790fd
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5.cpp')
-rw-r--r-- | src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5.cpp b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5.cpp index 4cbafbd71..3eda43d7c 100644 --- a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5.cpp +++ b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5.cpp @@ -71,6 +71,9 @@ QWaylandXdgSurfaceV5 *QWaylandXdgShellV5::createXdgSurface(QWaylandWindow *windo QWaylandXdgPopupV5 *QWaylandXdgShellV5::createXdgPopup(QWaylandWindow *window, QWaylandInputDevice *inputDevice) { QWaylandWindow *parentWindow = m_popups.empty() ? window->transientParent() : m_popups.last(); + if (!parentWindow) + return nullptr; + ::wl_surface *parentSurface = parentWindow->object(); if (m_popupSerial == 0) |