Fix system-dependent crash on exiting
This was SVN commit r8013.
This commit is contained in:
parent
445a300a3a
commit
d2f7973c29
@ -200,6 +200,8 @@ static int ProgressiveLoad()
|
||||
}
|
||||
|
||||
|
||||
static bool quit = false; // break out of main loop
|
||||
|
||||
static void Frame()
|
||||
{
|
||||
MICROLOG(L"Frame");
|
||||
@ -269,6 +271,12 @@ static void Frame()
|
||||
PumpEvents();
|
||||
PROFILE_END("input");
|
||||
|
||||
// if the user quit by closing the window, the GL context will be broken and
|
||||
// may crash when we call Render() on some drivers, so leave this loop
|
||||
// before rendering
|
||||
if (quit)
|
||||
return;
|
||||
|
||||
// respond to pumped resize events
|
||||
if (g_ResizedW || g_ResizedH)
|
||||
{
|
||||
@ -372,8 +380,6 @@ static void MainControllerShutdown()
|
||||
}
|
||||
|
||||
|
||||
static bool quit = false; // break out of main loop
|
||||
|
||||
// stop the main loop and trigger orderly shutdown. called from several
|
||||
// places: the event handler (SDL_QUIT and hotkey) and JS exitProgram.
|
||||
void kill_mainloop()
|
||||
|
Loading…
Reference in New Issue
Block a user