aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller')
-rw-r--r--MediaBrowser.Controller/Weather/WeatherClient.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/MediaBrowser.Controller/Weather/WeatherClient.cs b/MediaBrowser.Controller/Weather/WeatherClient.cs
index c49c50477..e2aada34f 100644
--- a/MediaBrowser.Controller/Weather/WeatherClient.cs
+++ b/MediaBrowser.Controller/Weather/WeatherClient.cs
@@ -53,12 +53,18 @@ namespace MediaBrowser.Controller.Weather
{
WeatherInfo info = new WeatherInfo();
- if (data.current_condition.Any())
+ if (data.current_condition != null)
{
- info.CurrentWeather = data.current_condition.First().ToWeatherStatus();
+ if (data.current_condition.Any())
+ {
+ info.CurrentWeather = data.current_condition.First().ToWeatherStatus();
+ }
}
- info.Forecasts = data.weather.Select(w => w.ToWeatherForecast()).ToArray();
+ if (data.weather != null)
+ {
+ info.Forecasts = data.weather.Select(w => w.ToWeatherForecast()).ToArray();
+ }
return info;
}