Fix for crash when closing DX window when CW not active

This commit is contained in:
dexy 2022-01-07 21:19:48 +11:00
parent bbdbb6ae59
commit d6039e87ab

View File

@ -284,6 +284,7 @@ namespace CodeWalker.Rendering
if (Form.ActiveForm == null)
{
Thread.Sleep(100); //reduce the FPS when the app isn't active (maybe this should be configurable?)
if (context.IsDisposed) return; //if form closed while sleeping (eg from rightclick on taskbar)
}
Rendering = true;