summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandwindow.cpp
diff options
context:
space:
mode:
authorAntonio Larrosa <alarrosa@suse.com>2018-03-05 13:56:15 +0100
committerAntonio Larrosa <alarrosa@suse.com>2018-03-05 14:08:38 +0000
commite283cc059c83cbb4fe677beaca8aebb99156ccc5 (patch)
treeb7931fcf8aa4fbcfbaee59b3d8f4b945fc369f95 /src/client/qwaylandwindow.cpp
parent23f8d1209399d0c1cab46362143fa7bf1dd69182 (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>
Diffstat (limited to 'src/client/qwaylandwindow.cpp')
-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 ecab8ffc..7d868b30 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -785,7 +785,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();
}