Commit cfa6d1fc authored by Matthieu Gallien's avatar Matthieu Gallien 🎵

fix album data in header bar being undefined

parent 7c63889a
......@@ -114,11 +114,15 @@ int ManageHeaderBar::albumIdRole() const
QVariant ManageHeaderBar::album() const
{
if (!mCurrentTrack.isValid()) {
return QString();
QVariant result = QString{};
if (!mCurrentTrack.isValid() || mCurrentTrack.data(mAlbumRole).isNull()) {
return result;
}
return mCurrentTrack.data(mAlbumRole);
result = mCurrentTrack.data(mAlbumRole);
return result;
}
QVariant ManageHeaderBar::albumArtist() const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment