From f0ec9ebbd6390469f2badf455ca59cfe701c7845 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 1 Nov 2004 06:46:46 +0000 Subject: [PATCH] fix assertion failure --- stepmania/src/RageSoundReader_Chain.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stepmania/src/RageSoundReader_Chain.cpp b/stepmania/src/RageSoundReader_Chain.cpp index 17fa384f7b..75da49f036 100644 --- a/stepmania/src/RageSoundReader_Chain.cpp +++ b/stepmania/src/RageSoundReader_Chain.cpp @@ -77,6 +77,9 @@ bool RageSoundReader_Chain::AddSound( CString sPath, float fOffsetSecs, float fP /* If every sound has the same sample rate, return it. Otherwise, return -1. */ int RageSoundReader_Chain::GetSampleRateInternal() const { + if( m_apLoadedSounds.empty() ) + return m_iPreferredSampleRate; + map::const_iterator it; int iRate = -1; for( it = m_apLoadedSounds.begin(); it != m_apLoadedSounds.end(); ++it )