fix CourseID::ToCourse for autogen courses

This commit is contained in:
Glenn Maynard
2004-08-30 21:55:50 +00:00
parent 5d0b1af78f
commit b6c039cac3
2 changed files with 21 additions and 6 deletions
+6
View File
@@ -968,6 +968,9 @@ Song* SongManager::GetSongFromDir( CString sDir )
Course* SongManager::GetCourseFromPath( CString sPath )
{
if( sPath == "" )
return NULL;
for( unsigned int i=0; i<m_pCourses.size(); i++ )
if( sPath.CompareNoCase(m_pCourses[i]->m_sPath) == 0 )
return m_pCourses[i];
@@ -977,6 +980,9 @@ Course* SongManager::GetCourseFromPath( CString sPath )
Course* SongManager::GetCourseFromName( CString sName )
{
if( sName == "" )
return NULL;
for( unsigned int i=0; i<m_pCourses.size(); i++ )
if( sName.CompareNoCase(m_pCourses[i]->GetFullDisplayTitle()) == 0 )
return m_pCourses[i];