Commit 4d8a8fcd authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

VLCMetadataService: Don't crash when parsing a file that isn't an album track

This is mostly a workaround before a proper architectural fix
parent 440bf54a
......@@ -186,6 +186,10 @@ bool VLCMetadataService::parseVideoFile( FilePtr file, VLC::Media& media ) const
bool VLCMetadataService::handleArtist( AlbumPtr album, AlbumTrackPtr track, VLC::Media& media, bool newAlbum ) const
// For now we don't handle artist if the file isn't an AlbumTrack.
// Let's not crash first, then fix it properly
if (track == nullptr)
return true;
auto newArtist = false;
auto artistName = media.meta( libvlc_meta_Artist );
if ( artistName.length() != 0 )
Supports Markdown
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