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:
parent
a7315d163b
commit
cce43a6555
@ -1586,6 +1586,11 @@ void IrrDriver::update(float dt)
|
|||||||
return;
|
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
|
// If the resolution should be switched, do it now. This will delete the
|
||||||
// old device and create a new one.
|
// old device and create a new one.
|
||||||
if (m_resolution_changing!=RES_CHANGE_NONE)
|
if (m_resolution_changing!=RES_CHANGE_NONE)
|
||||||
|
@ -39,6 +39,9 @@ public:
|
|||||||
~MainLoop();
|
~MainLoop();
|
||||||
void run();
|
void run();
|
||||||
void abort();
|
void abort();
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
|
/** Returns true if STK is to be stoppe. */
|
||||||
|
bool isAborted() const { return m_abort; }
|
||||||
}; // MainLoop
|
}; // MainLoop
|
||||||
|
|
||||||
extern MainLoop* main_loop;
|
extern MainLoop* main_loop;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user