UI: Prevent crash when closing window if mouse hide timer occurs after releasing the emulation core.

This commit is contained in:
Sour 2019-01-26 13:29:41 -05:00
parent b8422ca956
commit d7a850b59e
2 changed files with 7 additions and 0 deletions

View file

@ -29,6 +29,12 @@ namespace Mesen.GUI
_tmrCheckMouseMove.Start();
}
public static void StopTimers()
{
_tmrCheckMouseMove.Stop();
_tmrHideMouse.Stop();
}
private static void tmrCheckMouseMove_Tick(object sender, EventArgs e)
{
//Rarely the cursor becomes hidden despite leaving the window or moving

View file

@ -317,6 +317,7 @@ namespace Mesen.GUI.Forms
}
_shuttingDown = true;
CursorManager.StopTimers();
BaseForm.StopBackgroundTimer();
_logWindow?.Close();
_historyViewerWindow?.Close();