summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAntonio Larrosa <alarrosa@suse.com>2018-03-05 13:56:15 +0100
committerJani Heikkinen <jani.heikkinen@qt.io>2018-03-14 10:29:57 +0000
commite7955fdb14c7c7154a21677eb37f36894cf612dc (patch)
treeaf332d945fb3e31de664f1e30223cdf512a58c8b /src
parent13aaed5806c3a5ef90a11757e7aeb92360c71605 (diff)
Test for null pointer before using it
Task-number: QTBUG-66867 Change-Id: Ibbe407fa3ac32141b52fa0086e9f1ebfd27052ba Done-with: Fabian Vogt <fvogt@suse.de> Reviewed-by: Johan Helsing <johan.helsing@qt.io> Reviewed-by: Jan Grulich <jgrulich@redhat.com> (cherry picked from commit e283cc059c83cbb4fe677beaca8aebb99156ccc5)
Diffstat (limited to 'src')
-rw-r--r--src/client/qwaylandwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index d98708100..ac84e12b2 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -789,7 +789,7 @@ static QWaylandWindow *closestShellSurfaceWindow(QWindow *window)
{
while (window) {
auto w = static_cast<QWaylandWindow *>(window->handle());
- if (w->shellSurface())
+ if (w && w->shellSurface())
return w;
window = window->transientParent() ? window->transientParent() : window->parent();
}