From 89cf91fb3835e0b637a6ff3882c11ba606548e25 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 27 Apr 2005 01:23:56 +0000 Subject: [PATCH] don't keep failed sounds --- stepmania/src/RandomSample.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stepmania/src/RandomSample.cpp b/stepmania/src/RandomSample.cpp index 05d121798b..55abe1a111 100644 --- a/stepmania/src/RandomSample.cpp +++ b/stepmania/src/RandomSample.cpp @@ -70,7 +70,12 @@ bool RandomSample::LoadSound( CString sSoundFilePath ) LOG->Trace( "RandomSample::LoadSound( %s )", sSoundFilePath.c_str() ); RageSound *pSS = new RageSound; - pSS->Load( sSoundFilePath ); + if( !pSS->Load(sSoundFilePath) ) + { + LOG->Trace( "Error loading \"%s\": %s", sSoundFilePath.c_str(), pSS->GetError().c_str() ); + delete pSS; + return false; + } m_pSamples.push_back( pSS );