From 0a92622aac0ee4536fb97cfeb2b7934fb5d321ea Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 11 Jan 2003 18:37:52 +0000 Subject: [PATCH] fixed crash in ScreenDemonstration if no songs --- stepmania/src/ScreenDemonstration.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stepmania/src/ScreenDemonstration.cpp b/stepmania/src/ScreenDemonstration.cpp index 5c78f0aed6..740be26032 100644 --- a/stepmania/src/ScreenDemonstration.cpp +++ b/stepmania/src/ScreenDemonstration.cpp @@ -127,6 +127,9 @@ void ScreenDemonstration::FirstUpdate() { LOG->Trace( "ScreenDemonstration::FirstUpdate()" ); + if( GAMESTATE->m_pCurSong == NULL ) + return; + ScreenGameplay::FirstUpdate(); @@ -150,6 +153,12 @@ void ScreenDemonstration::FirstUpdate() void ScreenDemonstration::Update( float fDeltaTime ) { + if( GAMESTATE->m_pCurSong == NULL ) + { + Screen::Update(fDeltaTime); // handle screen messages + return; + } + ScreenGameplay::Update( fDeltaTime ); // hide status icons