Avoid calling guiengine::render if STK is about to be aborted. While

it didn't cause any problems so far, it feels wrong ;)


git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14438 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2013-11-15 00:05:35 +00:00
parent a7315d163b
commit cce43a6555
2 changed files with 8 additions and 0 deletions

View File

@ -1586,6 +1586,11 @@ void IrrDriver::update(float dt)
return;
}
// If we quit via the menu the m_device->run() does not return true.
// To avoid any other calls, we return here.
if(main_loop->isAborted())
return;
// If the resolution should be switched, do it now. This will delete the
// old device and create a new one.
if (m_resolution_changing!=RES_CHANGE_NONE)

View File

@ -39,6 +39,9 @@ public:
~MainLoop();
void run();
void abort();
// ------------------------------------------------------------------------
/** Returns true if STK is to be stoppe. */
bool isAborted() const { return m_abort; }
}; // MainLoop
extern MainLoop* main_loop;