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

fix album data in header bar being undefined

parent 7c63889a
...@@ -114,11 +114,15 @@ int ManageHeaderBar::albumIdRole() const ...@@ -114,11 +114,15 @@ int ManageHeaderBar::albumIdRole() const
QVariant ManageHeaderBar::album() const QVariant ManageHeaderBar::album() const
{ {
if (!mCurrentTrack.isValid()) { QVariant result = QString{};
return QString();
if (!mCurrentTrack.isValid() || mCurrentTrack.data(mAlbumRole).isNull()) {
return result;
} }
return mCurrentTrack.data(mAlbumRole); result = mCurrentTrack.data(mAlbumRole);
return result;
} }
QVariant ManageHeaderBar::albumArtist() const 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