1
0
forked from 0ad/0ad

Fix system-dependent crash on exiting

This was SVN commit r8013.
This commit is contained in:
Ykkrosh 2010-08-21 16:26:34 +00:00
parent 445a300a3a
commit d2f7973c29

View File

@ -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()