diff --git a/src/plugins/platforms/drm/drm_backend.cpp b/src/plugins/platforms/drm/drm_backend.cpp index 775b5db2c0..7e3d8afe64 100644 --- a/src/plugins/platforms/drm/drm_backend.cpp +++ b/src/plugins/platforms/drm/drm_backend.cpp @@ -349,8 +349,9 @@ void DrmBackend::removeOutput(DrmAbstractOutput *o) // placeholder doesn't actually need to render anything m_placeHolderOutput->renderLoop()->inhibit(); } - if (m_enabledOutputs.removeOne(o)) { + if (m_enabledOutputs.contains(o)) { Q_EMIT outputDisabled(o); + m_enabledOutputs.removeOne(o); } m_outputs.removeOne(o); Q_EMIT outputRemoved(o);