change how mainform disposes itself. it seems we can be disposed from deep inside winforms, likely when the window is closed. changed to not accidentally run dispose again
This commit is contained in:
parent
0b73ed77ef
commit
f33ac3cce6
|
@ -212,13 +212,15 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
else
|
||||
{
|
||||
using var mf = new MainForm(args);
|
||||
var mf = new MainForm(args);
|
||||
var title = mf.Text;
|
||||
mf.Show();
|
||||
mf.Text = title;
|
||||
try
|
||||
{
|
||||
GlobalWin.ExitCode = mf.ProgramRunLoop();
|
||||
if (!mf.IsDisposed)
|
||||
mf.Dispose();
|
||||
}
|
||||
catch (Exception e) when (GlobalWin.MovieSession.Movie.IsActive() && !(Debugger.IsAttached || VersionInfo.DeveloperBuild))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue