Fixes #4: nullreferenceexception when parsing track with no tags

This commit is contained in:
Rikki Tooley 2013-07-24 22:39:49 +01:00
parent ab9f873342
commit 4b8bb03d3f

View File

@ -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);
}