check for type, not ptr's address while deleting old items from browser

This commit is contained in:
Andrzej Rybczak
2009-01-16 22:41:36 +01:00
parent 14befc5b56
commit 430052bead

View File

@@ -167,7 +167,7 @@ void GetDirectory(string dir, string subdir)
locale_to_utf(dir);
for (size_t i = 0; i < mBrowser->Size(); i++)
if (mBrowser->at(i).song != (void *)1)
if (mBrowser->at(i).type == itSong)
delete mBrowser->at(i).song;
mBrowser->Clear(0);