summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Edmundson <davidedmundson@kde.org>2017-07-19 13:01:24 +0100
committerDavid Edmundson <davidedmundson@kde.org>2017-07-19 14:23:58 +0000
commit1ad476827975419594f7b294b5fc984ee59237ad (patch)
treead6c171daebaef5d804bca3e37eded0d14f5827f
parentee2d39044f8a9a42a9da945ee18e135690efa0e3 (diff)
Reset mFrameCallback in destruction
Otherwise we crash if we call reset twice. For example if we call setParent and setVisible together. Change-Id: I7f07825167bf8c3236a80e649a6d6805fd6c868b Reviewed-by: Johan Helsing <johan.helsing@qt.io>
-rw-r--r--src/client/qwaylandwindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 5585fd52a..98d0603cc 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -249,8 +249,10 @@ void QWaylandWindow::reset()
if (isInitialized())
destroy();
- if (mFrameCallback)
+ if (mFrameCallback) {
wl_callback_destroy(mFrameCallback);
+ mFrameCallback = nullptr;
+ }
}
QWaylandWindow *QWaylandWindow::fromWlSurface(::wl_surface *surface)