From 3c473752298e2bc91d3cb10a13c236cfaa2bc11e Mon Sep 17 00:00:00 2001 From: LukePulverenti Luke Pulverenti luke pulverenti Date: Sun, 2 Sep 2012 13:34:12 -0400 Subject: Weather updates --- MediaBrowser.Controller/Weather/WeatherClient.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'MediaBrowser.Controller/Weather/WeatherClient.cs') 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; } -- cgit v1.2.3