浏览代码

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;