From 48bac59013fe181321e4dfb52806794cceaf881a Mon Sep 17 00:00:00 2001 From: hikerstk Date: Sun, 6 May 2012 23:54:53 +0000 Subject: [PATCH] Replaced simple cast with proper dynamic cast to avoid potential incorrect cast problems (I can't figure out what this line is supposed to do ... as far as I could see it appears not to be used at all, and m_phase never reaches FINISH_PHASE). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11188 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/modes/world_status.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modes/world_status.cpp b/src/modes/world_status.cpp index 4b88bfa93..915519853 100644 --- a/src/modes/world_status.cpp +++ b/src/modes/world_status.cpp @@ -226,8 +226,10 @@ void WorldStatus::update(const float dt) // Wait for the race over GUI/modal dialog to appear // Previously the in race race over results are shown, // and getCurrent() returns NULL. - GUIEngine::ModalDialog *m = GUIEngine::ModalDialog::getCurrent(); - if( m && ( (RaceOverDialog*)m)->menuIsFinished() ) + RaceOverDialog *m = + dynamic_cast(GUIEngine::ModalDialog + ::getCurrent()); + if( m && m->menuIsFinished() ) { m_phase = FINISH_PHASE; }