summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@qt.io>2018-11-07 14:19:04 +0100
committerJohan Helsing <johan.helsing@qt.io>2018-11-16 13:13:02 +0000
commitfa57079a227b92218c5b23dafdcb7f547acb635d (patch)
tree8eb2eea98d08c67644c0049aa152b3cdb85d5ea8
parent49ea0fc16a499514ebc0c254a983e86bcda88dd6 (diff)
Don't crash if view is deleted from surfaceDestroyed signal
Fix regression introduced in 297bcd005c4205f69e1bf9e9dc565ab757cf0bac Fixes: QTBUG-71643 Change-Id: I769518a9ca13fcd13ea277c7fa8ac1885ca123ba Reviewed-by: Johan Helsing <johan.helsing@qt.io> (cherry picked from commit f890798053c7fa692bff7f8a3e96583dfcaba0cb) Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
-rw-r--r--src/compositor/compositor_api/qwaylandview.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compositor/compositor_api/qwaylandview.cpp b/src/compositor/compositor_api/qwaylandview.cpp
index 12759377..1a6bf1a6 100644
--- a/src/compositor/compositor_api/qwaylandview.cpp
+++ b/src/compositor/compositor_api/qwaylandview.cpp
@@ -56,8 +56,10 @@ void QWaylandViewPrivate::markSurfaceAsDestroyed(QWaylandSurface *surface)
Q_ASSERT(surface == this->surface);
setSurface(nullptr);
+ QPointer<QWaylandView> deleteGuard(q);
emit q->surfaceDestroyed();
- clearFrontBuffer();
+ if (!deleteGuard.isNull())
+ clearFrontBuffer();
}
/*!