tag editor: fix assertion failure when directory has no subdirectories

This commit is contained in:
Andrzej Rybczak
2015-05-11 23:53:30 +02:00
parent a76cfeef8d
commit b0a2ed1203

View File

@@ -337,9 +337,9 @@ void TagEditor::enterPressed()
{
MPD::DirectoryIterator directory = Mpd.GetDirectories(Dirs->current()->value().second), end;
bool has_subdirs = directory != end;
directory.finish();
if (has_subdirs)
{
directory.finish();
itsHighlightedDir = itsBrowsedDir;
itsBrowsedDir = Dirs->current()->value().second;
Dirs->clear();