diff --git a/stepmania/src/ActorUtil.cpp b/stepmania/src/ActorUtil.cpp index 55c9484dd5..7eef6ba278 100644 --- a/stepmania/src/ActorUtil.cpp +++ b/stepmania/src/ActorUtil.cpp @@ -41,7 +41,14 @@ Actor* MakeActor( CString sPath ) CString sFileName; ini.GetValue( "Actor", "File", sFileName ); - Actor* pActor = MakeActor( sDir+sFileName ); + CString sNewPath = sDir+sFileName; + + if( !DoesFileExist(sNewPath) ) + RageException::Throw( "The actor file '%s' references a file '%s' which doesn't exist.", sPath.c_str(), sNewPath.c_str() ); + + sNewPath = DerefRedir( sNewPath ); + + Actor* pActor = MakeActor( sNewPath ); float f; if( ini.GetValueF( "Actor", "BaseRotationXDegrees", f ) ) pActor->SetBaseRotationX( f ); diff --git a/stepmania/src/RageUtil.cpp b/stepmania/src/RageUtil.cpp index 3960d3dc62..48f6fffa05 100644 --- a/stepmania/src/RageUtil.cpp +++ b/stepmania/src/RageUtil.cpp @@ -554,6 +554,10 @@ CString DerefRedir(const CString &path) CollapsePath( path2 ); ResolvePath( path2 ); + + if( !DoesFileExist(path2) ) + RageException::Throw( "The redirect '%s' references a file '%s' which doesn't exist.", path.c_str(), path2.c_str() ); + return path2; }