From 9158518994c3ca97289af6b37baa189c77ff3600 Mon Sep 17 00:00:00 2001 From: cory_shivers Date: Tue, 14 Jul 2015 00:05:16 -0500 Subject: [PATCH] Fixed null Uri issue when playing adds Checks for null Uri before attempting to read it --- SpotifyAPI/Local/Models/Track.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SpotifyAPI/Local/Models/Track.cs b/SpotifyAPI/Local/Models/Track.cs index 888c75d7..9e92ded3 100644 --- a/SpotifyAPI/Local/Models/Track.cs +++ b/SpotifyAPI/Local/Models/Track.cs @@ -28,8 +28,9 @@ namespace SpotifyAPI.Local.Models /// A String, which is the URL to the Albumart public String GetAlbumArtUrl(AlbumArtSize size) { - if (AlbumResource.Uri.Contains("local")) + if (AlbumResource.Uri == null || AlbumResource.Uri.Contains("local")) return ""; + int albumsize = 0; switch (size) {