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 @@ -814,16 +814,19 @@ void CollectionSystemManager::removeCollectionsFromDisplayedSystems()
814814
815815 // remove all custom collections in bundle
816816 // this should not delete the objects from memory!
817- FileData* customRoot = mCustomCollectionsBundle ->getRootFolder ();
818- std::vector<FileData*> mChildren = customRoot->getChildren ();
819- for (auto it = mChildren .cbegin (); it != mChildren .cend (); it++)
817+ if (mCustomCollectionsBundle )
820818 {
821- customRoot->removeChild (*it);
819+ FileData* customRoot = mCustomCollectionsBundle ->getRootFolder ();
820+ std::vector<FileData*> mChildren = customRoot->getChildren ();
821+ for (auto it = mChildren .cbegin (); it != mChildren .cend (); it++)
822+ {
823+ customRoot->removeChild (*it);
824+ }
825+ // clear index
826+ mCustomCollectionsBundle ->getIndex ()->resetIndex ();
827+ // remove view so it's re-created as needed
828+ ViewController::get ()->removeGameListView (mCustomCollectionsBundle );
822829 }
823- // clear index
824- mCustomCollectionsBundle ->getIndex ()->resetIndex ();
825- // remove view so it's re-created as needed
826- ViewController::get ()->removeGameListView (mCustomCollectionsBundle );
827830}
828831
829832void CollectionSystemManager::addEnabledCollectionsToDisplayedSystems (std::map<std::string, CollectionSystemData>* colSystemData)
You can’t perform that action at this time.
0 commit comments