summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKari Oikarinen <kari.oikarinen@qt.io>2020-01-15 19:09:19 +0200
committerKari Oikarinen <kari.oikarinen@qt.io>2020-01-15 19:09:19 +0200
commitc2f216ef211ae8fbe0073c296742f584f5493e9f (patch)
tree416488a3ffdf1cd19ed00f7e1b3a5a28f1d8c1da
parent5c5532bbac106d02359aaf6230c0c73fec8dbb7e (diff)
parent5ed697cda35fe300d2cb828370aaee489a0f9317 (diff)
Merge 5.14 into 5.14.1v5.14.15.14.1
-rw-r--r--src/compositor/compositor_api/qwaylandcompositor.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/compositor/compositor_api/qwaylandcompositor.cpp b/src/compositor/compositor_api/qwaylandcompositor.cpp
index 5b77a3be..e021b742 100644
--- a/src/compositor/compositor_api/qwaylandcompositor.cpp
+++ b/src/compositor/compositor_api/qwaylandcompositor.cpp
@@ -236,9 +236,12 @@ void QWaylandCompositorPrivate::init()
QWaylandCompositorPrivate::~QWaylandCompositorPrivate()
{
- qDeleteAll(clients);
+ // Take copies, since the lists will get modified as elements are deleted
+ const auto clientsToDelete = clients;
+ qDeleteAll(clientsToDelete);
- qDeleteAll(outputs);
+ const auto outputsToDelete = outputs;
+ qDeleteAll(outputsToDelete);
#if QT_CONFIG(wayland_datadevice)
delete data_device_manager;