mirror of
https://github.com/Sarsoo/IF.Lastfm.git
synced 2024-10-17 07:13:09 +01:00
Fixes #4: nullreferenceexception when parsing track with no tags
This commit is contained in:
parent
ab9f873342
commit
4b8bb03d3f
@ -61,7 +61,7 @@ internal static Track ParseJToken(JToken token)
|
||||
}
|
||||
|
||||
var tagsToken = token.SelectToken("toptags");
|
||||
if (tagsToken != null)
|
||||
if (tagsToken != null && tagsToken.HasValues)
|
||||
{
|
||||
t.TopTags = tagsToken.SelectToken("tag").Children().Select(Tag.ParseJToken);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user