diff options
author | David Edmundson <davidedmundson@kde.org> | 2017-07-19 13:01:24 +0100 |
---|---|---|
committer | David Edmundson <davidedmundson@kde.org> | 2017-07-19 14:23:58 +0000 |
commit | 1ad476827975419594f7b294b5fc984ee59237ad (patch) | |
tree | ad6c171daebaef5d804bca3e37eded0d14f5827f | |
parent | ee2d39044f8a9a42a9da945ee18e135690efa0e3 (diff) | |
download | qtwayland-1ad476827975419594f7b294b5fc984ee59237ad.tar.gz |
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.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp index 5585fd52..98d0603c 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) |