From: Kazuhiro Fujieda Date: Sun, 9 May 2021 08:22:19 +0000 (+0900) Subject: 終了時に一部の環境で例外が出ることがあるのを直す X-Git-Tag: v12.10~3 X-Git-Url: http://git.osdn.net/view?p=kancollesniffer%2FKancolleSniffer.git;a=commitdiff_plain;h=5c44fa7cec0cf2e1b3af2a8ae2b4042b808d1b0e 終了時に一部の環境で例外が出ることがあるのを直す --- diff --git a/KancolleSniffer/MainWindow.cs b/KancolleSniffer/MainWindow.cs index 4b4fc85..7f14bfe 100644 --- a/KancolleSniffer/MainWindow.cs +++ b/KancolleSniffer/MainWindow.cs @@ -254,9 +254,10 @@ namespace KancolleSniffer return; } } - if (!SystemShutdown) + if (SystemShutdown) + _listFormGroup.WaitForCloseAll(); + else _listFormGroup.Close(); // 各自で終了処理するのでシャットダウン時は不要 - _listFormGroup.WaitForCloseAll(); Config.Location = (Form.WindowState == FormWindowState.Normal ? Form.Bounds : Form.RestoreBounds).Location; Config.ShowHpInPercent = _c.fleetPanel.ShowHpInPercent; } diff --git a/KancolleSniffer/View/SwipeScrollify.cs b/KancolleSniffer/View/SwipeScrollify.cs index 48de5c1..2bea2e7 100644 --- a/KancolleSniffer/View/SwipeScrollify.cs +++ b/KancolleSniffer/View/SwipeScrollify.cs @@ -165,7 +165,7 @@ namespace KancolleSniffer.View public void MouseDown(IntPtr handle, ref bool handled) { - if (!_panel.ScrollBar.Visible) + if (!_panel.ScrollBar.Visible || _panel.IsDisposed) return; if (!_mouseStart.IsEmpty) return;