summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2017-01-03 12:10:52 +0100
committerJani Heikkinen <jani.heikkinen@qt.io>2017-01-05 05:51:10 +0000
commit1bb1eed9ee23f975ee1c132fa77f480fe91352d6 (patch)
tree2acce24a3a65102ab9bd53761da73a9329f21180
parent39033d83bb87632cce43bf89325e24b887803536 (diff)
Don't call wl_surface::destroy if the surface was never initialized
Task-number: QTBUG-57757 Change-Id: I85b74a3445c8d9df1a89b16760ce57e45204d2c6 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@hawaiios.org> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
-rw-r--r--src/client/qwaylandwindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 0e3c0b28..c8be9c14 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -222,7 +222,8 @@ void QWaylandWindow::reset()
mShellSurface = 0;
delete mSubSurfaceWindow;
mSubSurfaceWindow = 0;
- destroy();
+ if (isInitialized())
+ destroy();
if (mFrameCallback)
wl_callback_destroy(mFrameCallback);