File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -813,16 +813,19 @@ void CollectionSystemManager::removeCollectionsFromDisplayedSystems()
813813
814814 // remove all custom collections in bundle
815815 // this should not delete the objects from memory!
816- FileData* customRoot = mCustomCollectionsBundle ->getRootFolder ();
817- std::vector<FileData*> mChildren = customRoot->getChildren ();
818- for (auto it = mChildren .cbegin (); it != mChildren .cend (); it++)
816+ if (mCustomCollectionsBundle )
819817 {
820- customRoot->removeChild (*it);
818+ FileData* customRoot = mCustomCollectionsBundle ->getRootFolder ();
819+ std::vector<FileData*> mChildren = customRoot->getChildren ();
820+ for (auto it = mChildren .cbegin (); it != mChildren .cend (); it++)
821+ {
822+ customRoot->removeChild (*it);
823+ }
824+ // clear index
825+ mCustomCollectionsBundle ->getIndex ()->resetIndex ();
826+ // remove view so it's re-created as needed
827+ ViewController::get ()->removeGameListView (mCustomCollectionsBundle );
821828 }
822- // clear index
823- mCustomCollectionsBundle ->getIndex ()->resetIndex ();
824- // remove view so it's re-created as needed
825- ViewController::get ()->removeGameListView (mCustomCollectionsBundle );
826829}
827830
828831void CollectionSystemManager::addEnabledCollectionsToDisplayedSystems (std::map<std::string, CollectionSystemData>* colSystemData)
You can’t perform that action at this time.
0 commit comments