qt5-qtwayland/qtwayland-test-for-null-pointer-before-using-it.patch
2018-03-13 11:11:17 +01:00

14 lines
548 B
Diff

diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 54395a64..edaf2bec 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -801,7 +801,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();
}