Selaa lähdekoodia

Fix nonexistent MyRoom folder breaking BG selector

When MyRoom folder is missing, CreativeRoomManager.GetSaveDataDic()
returns null. Since the dictionary is null, the MyRoomCustomBGIndex is
always -1. This implies that every BG that's selected is a MyRoom BG
which fails to load.

This change sets the myRoomCustom index to the BGList count regardless
of there being MyRoom BGs.
habeebweeb 3 vuotta sitten
vanhempi
commit
2d48ca454d
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3 3
      src/MeidoPhotoStudio.Plugin/Constants.cs

+ 3 - 3
src/MeidoPhotoStudio.Plugin/Constants.cs

@@ -542,13 +542,13 @@ namespace MeidoPhotoStudio.Plugin
                 }
             }
 
+            // Set index regardless of there being myRoom bgs or not
+            MyRoomCustomBGIndex = BGList.Count;
+
             Dictionary<string, string> saveDataDict = CreativeRoomManager.GetSaveDataDic();
 
             if (saveDataDict != null)
-            {
-                MyRoomCustomBGIndex = BGList.Count;
                 MyRoomCustomBGList.AddRange(saveDataDict);
-            }
         }
 
         public static void InitializeDogu()