From 7a33611ede38de7d05a18fb61a9b1c4fde19e9a2 Mon Sep 17 00:00:00 2001 From: abeloin Date: Tue, 28 Jan 2014 01:11:35 -0500 Subject: [PATCH] Bug in Mono: WebUtility.HtmlDecode generate an System.ArgumentNullException if input is null. --- MediaBrowser.Providers/Movies/MovieDbProvider.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.Providers/Movies/MovieDbProvider.cs b/MediaBrowser.Providers/Movies/MovieDbProvider.cs index d6937293c..6f32aa135 100644 --- a/MediaBrowser.Providers/Movies/MovieDbProvider.cs +++ b/MediaBrowser.Providers/Movies/MovieDbProvider.cs @@ -697,7 +697,8 @@ namespace MediaBrowser.Providers.Movies } if (!movie.LockedFields.Contains(MetadataFields.Overview)) { - movie.Overview = WebUtility.HtmlDecode(movieData.overview); + // Bug in Mono: WebUtility.HtmlDecode should return null if the string is null but in Mono it generate an System.ArgumentNullException. + movie.Overview = movieData.overview != null ? WebUtility.HtmlDecode(movieData.overview) : null; movie.Overview = movie.Overview != null ? movie.Overview.Replace("\n\n", "\n") : null; } movie.HomePageUrl = movieData.homepage;