Преглед на файлове

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 години
родител
ревизия
c30925f2af
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      COM3D2.MeidoPhotoStudio.Plugin/MeidoPhotoStudio/Managers/MeidoManager.cs

+ 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;