skip SONGMAN->GetSongFromDir if sDir2.empty()

This commit is contained in:
Glenn Maynard
2007-08-12 22:44:22 +00:00
parent 8022c3ba04
commit 73cc4c0793
+2 -1
View File
@@ -885,7 +885,7 @@ void SongID::FromSong( const Song *p )
Song *SongID::ToSong() const Song *SongID::ToSong() const
{ {
Song *pRet; Song *pRet = NULL;
if( !m_Cache.Get(&pRet) ) if( !m_Cache.Get(&pRet) )
{ {
// HACK for backwards compatibility: // HACK for backwards compatibility:
@@ -894,6 +894,7 @@ Song *SongID::ToSong() const
if( sDir2.Left(1) != "/" ) if( sDir2.Left(1) != "/" )
sDir2 = "/" + sDir2; sDir2 = "/" + sDir2;
if( !sDir2.empty() )
pRet = SONGMAN->GetSongFromDir( sDir2 ); pRet = SONGMAN->GetSongFromDir( sDir2 );
m_Cache.Set( pRet ); m_Cache.Set( pRet );
} }