song info: fix #3786 (crash when pressing 'i' to get info of the stream)

This commit is contained in:
Alexander Lopatin
2013-07-07 21:22:21 +04:00
committed by Andrzej Rybczak
parent 68ff3fae47
commit ed883e2059

View File

@@ -101,7 +101,7 @@ void SongInfo::PrepareSong(MPD::Song &s)
w << "\n\n" << NC::Color::End;
w << NC::Format::Bold << "Length: " << NC::Format::NoBold << Config.color2 << s.getLength() << '\n' << NC::Color::End;
# ifdef HAVE_TAGLIB_H
if (!Config.mpd_music_dir.empty())
if (!Config.mpd_music_dir.empty() && !s.isStream())
{
std::string path_to_file;
if (s.isFromDatabase())