Selaa lähdekoodia

Check meido before setting global gravity

When there are no meidos, setting global gravity is not possible through
the UI. Deserializing a scene can modify the global gravity value
without there being meidos and that breaks deserialization.
habeebweeb 4 vuotta sitten
vanhempi
commit
c30925f2af

+ 3 - 0
COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/Managers/MeidoManager.cs

@@ -33,6 +33,9 @@ namespace COM3D2.MeidoPhotoStudio.Plugin
             set
             {
                 globalGravity = value;
+
+                if (!HasActiveMeido) return;
+
                 Meido activeMeido = ActiveMeido;
                 int activeMeidoSlot = activeMeido.Slot;