diff --git a/DHSoftware/LoginWindow.cs b/DHSoftware/LoginWindow.cs index 29ab6f2..b4a6b85 100644 --- a/DHSoftware/LoginWindow.cs +++ b/DHSoftware/LoginWindow.cs @@ -25,7 +25,7 @@ namespace DHSoftware { get { - if (_instance == null) + if (_instance == null || _instance.IsDisposed) _instance = new LoginWindow(); return _instance; } diff --git a/DHSoftware/Views/SettingWindow.cs b/DHSoftware/Views/SettingWindow.cs index 2719ab0..35b584c 100644 --- a/DHSoftware/Views/SettingWindow.cs +++ b/DHSoftware/Views/SettingWindow.cs @@ -27,7 +27,7 @@ namespace DHSoftware.Views { get { - if (_instance == null) + if (_instance == null || _instance.IsDisposed) _instance = new SettingWindow(); return _instance; }