do not try to show an exception windows when main form is already disposed

This commit is contained in:
Faryan Rezagholi
2019-07-01 22:24:46 +02:00
parent 69e4bc2650
commit 5cab342c8c

View File

@@ -88,8 +88,11 @@ namespace mRemoteNG.App
if (!FrmSplashScreen.getInstance().IsDisposed)
FrmSplashScreen.getInstance().Close();
if (FrmMain.Default.IsDisposed) return;
var window = new UnhandledExceptionWindow(e.Exception, false);
window.ShowDialog(FrmMain.Default);
}
private static void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs e)