summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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();
}
/*!