OSDN Git Service

終了時に一部の環境で例外が出ることがあるのを直す
authorKazuhiro Fujieda <fujieda@users.osdn.me>
Sun, 9 May 2021 08:22:19 +0000 (17:22 +0900)
committerKazuhiro Fujieda <fujieda@users.osdn.me>
Sun, 9 May 2021 08:22:19 +0000 (17:22 +0900)
KancolleSniffer/MainWindow.cs
KancolleSniffer/View/SwipeScrollify.cs

index 4b4fc85..7f14bfe 100644 (file)
@@ -254,9 +254,10 @@ namespace KancolleSniffer
                     return;\r
                 }\r
             }\r
-            if (!SystemShutdown)\r
+            if (SystemShutdown)\r
+                _listFormGroup.WaitForCloseAll();\r
+            else\r
                 _listFormGroup.Close(); // 各自で終了処理するのでシャットダウン時は不要\r
-            _listFormGroup.WaitForCloseAll();\r
             Config.Location = (Form.WindowState == FormWindowState.Normal ? Form.Bounds : Form.RestoreBounds).Location;\r
             Config.ShowHpInPercent = _c.fleetPanel.ShowHpInPercent;\r
         }\r
index 48de5c1..2bea2e7 100644 (file)
@@ -165,7 +165,7 @@ namespace KancolleSniffer.View
 \r
             public void MouseDown(IntPtr handle, ref bool handled)\r
             {\r
-                if (!_panel.ScrollBar.Visible)\r
+                if (!_panel.ScrollBar.Visible || _panel.IsDisposed)\r
                     return;\r
                 if (!_mouseStart.IsEmpty)\r
                     return;\r