diff --git a/autotests/integration/test_helpers.cpp b/autotests/integration/test_helpers.cpp index 72c205b6ee..769b103291 100644 --- a/autotests/integration/test_helpers.cpp +++ b/autotests/integration/test_helpers.cpp @@ -118,6 +118,9 @@ bool setupWaylandConnection(AdditionalWaylandInterfaces flags) output->deleteLater(); s_waylandConnection.outputs.removeOne(output); }); + QObject::connect(output, &Output::destroyed, [=]() { + s_waylandConnection.outputs.removeOne(output); + }); }); QSignalSpy allAnnounced(registry, &Registry::interfacesAnnounced);