From 11dc73c6ced382465a57b13fa49a0dada032197b Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Tue, 25 Oct 2022 16:26:17 +0200 Subject: [PATCH] effectshandler: Reset iterators when active effects changes Clearing and resizing m_activeEffects invalidates iterators, so we need to ensure we reset any iterators that were stored. --- src/effects.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/effects.cpp b/src/effects.cpp index 1e316f70ac..5276d633d2 100644 --- a/src/effects.cpp +++ b/src/effects.cpp @@ -1574,6 +1574,10 @@ void EffectsHandlerImpl::effectsChanged() std::back_inserter(loaded_effects)); m_activeEffects.reserve(loaded_effects.count()); + + m_currentPaintScreenIterator = m_activeEffects.constBegin(); + m_currentPaintWindowIterator = m_activeEffects.constBegin(); + m_currentDrawWindowIterator = m_activeEffects.constBegin(); } QStringList EffectsHandlerImpl::activeEffects() const