From 7bb3752901c963bf6d3e846626e29fdc2f76b344 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 14 Feb 2004 10:38:40 +0000 Subject: [PATCH] sanity check --- stepmania/src/ActorUtil.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index b1f62faaed..c79b502afe 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -64,6 +64,12 @@ Actor* LoadFromActorFile( CString sIniPath, CString sLayer ) * * and allow "$TextItem$" in .actors to reference that. */ + /* Be careful: if sFile is "", and we don't check it, then we can end up recursively + * loading the BGAnimationLayer that we're in. */ + if( sFile == "" ) + RageException::Throw( "The actor file '%s' layer %s is missing File", + sIniPath.c_str(), sLayer.c_str() ); + CString text; if( ini.GetValue ( sLayer, "Text", text ) ) { @@ -84,7 +90,6 @@ Actor* LoadFromActorFile( CString sIniPath, CString sLayer ) } else { - if( sFile.CompareNoCase("songbackground")==0 ) { Song *pSong = GAMESTATE->m_pCurSong;