summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylandsurface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/qwaylandsurface.cpp')
-rw-r--r--src/client/qwaylandsurface.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/qwaylandsurface.cpp b/src/client/qwaylandsurface.cpp
index c35f01b56..21e70ce4f 100644
--- a/src/client/qwaylandsurface.cpp
+++ b/src/client/qwaylandsurface.cpp
@@ -72,8 +72,12 @@ QWaylandSurface *QWaylandSurface::fromWlSurface(::wl_surface *surface)
void QWaylandSurface::handleScreenRemoved(QScreen *qScreen)
{
- auto *screen = static_cast<QWaylandScreen *>(qScreen->handle());
- if (m_screens.removeOne(screen))
+ auto *platformScreen = qScreen->handle();
+ if (platformScreen->isPlaceholder())
+ return;
+
+ auto *waylandScreen = static_cast<QWaylandScreen *>(qScreen->handle());
+ if (m_screens.removeOne(waylandScreen))
emit screensChanged();
}