Fixed crash in demo mode when demo mode is started while 'internet yes/no'
dialog is shown (or the track info dialog). Together with r11958 this fixed #663. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11960 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
e727e34b9d
commit
1822c7e266
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "modes/demo_world.hpp"
|
#include "modes/demo_world.hpp"
|
||||||
|
|
||||||
|
#include "guiengine/modaldialog.hpp"
|
||||||
#include "input/device_manager.hpp"
|
#include "input/device_manager.hpp"
|
||||||
#include "input/input_manager.hpp"
|
#include "input/input_manager.hpp"
|
||||||
#include "network/network_manager.hpp"
|
#include "network/network_manager.hpp"
|
||||||
@ -101,6 +102,10 @@ void DemoWorld::enterRaceOverState()
|
|||||||
*/
|
*/
|
||||||
bool DemoWorld::updateIdleTimeAndStartDemo(float dt)
|
bool DemoWorld::updateIdleTimeAndStartDemo(float dt)
|
||||||
{
|
{
|
||||||
|
// We get crashes if stk is activated when a modal dialog is open
|
||||||
|
if(GUIEngine::ModalDialog::isADialogActive())
|
||||||
|
return false;
|
||||||
|
|
||||||
m_current_idle_time += dt;
|
m_current_idle_time += dt;
|
||||||
if(m_current_idle_time <= m_max_idle_time)
|
if(m_current_idle_time <= m_max_idle_time)
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user