tag editor: fix assertion failure when directory has no subdirectories

master
Andrzej Rybczak 11 years ago
parent a76cfeef8d
commit b0a2ed1203
  1. 2
      src/tag_editor.cpp

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

Loading…
Cancel
Save