From d789b6b98187ebd16dcf6a95b29a6ec40de58463 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sat, 3 Aug 2002 22:05:04 +0000 Subject: [PATCH] fixed a couple stupid crashes --- stepmania/src/Background.cpp | 8 +++++++- stepmania/src/ScreenTitleMenu.cpp | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/stepmania/src/Background.cpp b/stepmania/src/Background.cpp index 538eb0dfac..9855d757f1 100644 --- a/stepmania/src/Background.cpp +++ b/stepmania/src/Background.cpp @@ -1,11 +1,12 @@ #include "stdafx.h" /* ----------------------------------------------------------------------------- - File: Background.cpp + Class: Background Desc: Background behind arrows while dancing Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford ----------------------------------------------------------------------------- */ @@ -273,6 +274,11 @@ void Background::Update( float fDeltaTime ) for( int i=0; i m_fSongBeat ) break; + if( i == m_aAnimSegs.GetSize() ) + { + m_pCurBGA = NULL; + break; // no animations + } int iNewAnimationSegment = i; if( iNewAnimationSegment > m_iCurAnimSegment ) { diff --git a/stepmania/src/ScreenTitleMenu.cpp b/stepmania/src/ScreenTitleMenu.cpp index 3bb2123cba..fde87915b2 100644 --- a/stepmania/src/ScreenTitleMenu.cpp +++ b/stepmania/src/ScreenTitleMenu.cpp @@ -74,6 +74,7 @@ const float SECONDS_BEFORE_DEMONSTRATION = 30; ScreenTitleMenu::ScreenTitleMenu() { + MUSIC->Stop(); LOG->Trace( "ScreenTitleMenu::ScreenTitleMenu()" );