diff options
Diffstat (limited to 'src/song.cpp')
-rw-r--r-- | src/song.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/song.cpp b/src/song.cpp index c7d07ba7..3498e37f 100644 --- a/src/song.cpp +++ b/src/song.cpp @@ -74,7 +74,9 @@ std::string Song::getName(unsigned idx) const assert(m_song); mpd_song *s = m_song.get(); const char *res = mpd_song_get_tag(s, MPD_TAG_NAME, idx); - if (!res && idx > 0) + if (res) + return res; + else if (idx > 0) return ""; const char *uri = mpd_song_get_uri(s); const char *name = strrchr(uri, '/'); |