From c0a2f9f5574dc77ba4b3bf5adab96e7e30183dd3 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Wed, 18 Oct 2023 17:49:39 +0200 Subject: [PATCH] Fixed an issue where repeatedly enabling and disabling auto collections could crash the application --- es-app/src/CollectionSystemsManager.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/es-app/src/CollectionSystemsManager.cpp b/es-app/src/CollectionSystemsManager.cpp index 6954f82fc..0f9491a15 100644 --- a/es-app/src/CollectionSystemsManager.cpp +++ b/es-app/src/CollectionSystemsManager.cpp @@ -1351,10 +1351,13 @@ void CollectionSystemsManager::removeCollectionsFromDisplayedSystems() // Remove all collection Systems. for (auto sysIt = SystemData::sSystemVector.cbegin(); sysIt != SystemData::sSystemVector.cend();) { - if ((*sysIt)->isCollection()) + if ((*sysIt)->isCollection()) { + (*sysIt)->getRootFolder()->setUpdateListCallback(nullptr); sysIt = SystemData::sSystemVector.erase(sysIt); - else + } + else { ++sysIt; + } } // Remove all custom collections in bundle.