Fix crash when closing window in the middle of a race
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12911 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
564bc8ad23
commit
454fef7fe4
@ -1545,6 +1545,9 @@ int main(int argc, char *argv[] )
|
|||||||
delete wiimote_manager;
|
delete wiimote_manager;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// If the window was closed in the middle of a race, remove players,
|
||||||
|
// so we don't crash later when StateManager tries to access input devices.
|
||||||
|
StateManager::get()->resetActivePlayers();
|
||||||
if(input_manager) delete input_manager; // if early crash avoid delete NULL
|
if(input_manager) delete input_manager; // if early crash avoid delete NULL
|
||||||
|
|
||||||
cleanSuperTuxKart();
|
cleanSuperTuxKart();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user