diff options
| author | LukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com> | 2012-09-02 13:34:12 -0400 |
|---|---|---|
| committer | LukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com> | 2012-09-02 13:34:12 -0400 |
| commit | 3c473752298e2bc91d3cb10a13c236cfaa2bc11e (patch) | |
| tree | 5cc0efbfacd5927687246377408d4f4d9dd8bc04 /MediaBrowser.Controller/Weather/WeatherClient.cs | |
| parent | b6bc22ae638f8a8ad54609547ceb82253b4386d2 (diff) | |
Weather updates
Diffstat (limited to 'MediaBrowser.Controller/Weather/WeatherClient.cs')
| -rw-r--r-- | MediaBrowser.Controller/Weather/WeatherClient.cs | 12 |
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;
}
|
