diff options
author | Bastien Nocera <hadess@hadess.net> | 2018-10-08 12:27:14 +0200 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2018-10-18 12:10:42 +0200 |
commit | d9a73ee41523449df84737ba94f4b0a2421391aa (patch) | |
tree | b85eb01559afb76ae943db7f78bcffb555b2e7a6 | |
parent | 0e334a7b950fdcd8484ee88bd8411dac1c6201e2 (diff) | |
download | libgweather-d9a73ee41523449df84737ba94f4b0a2421391aa.tar.gz |
weather: Consider moon phases to not be available for named timezones
Don't return a moon phase that's marked as valid for GWeatherLocations
without a valid long/lat.
-rw-r--r-- | libgweather/weather-moon.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libgweather/weather-moon.c b/libgweather/weather-moon.c index 993cdff..01466b1 100644 --- a/libgweather/weather-moon.c +++ b/libgweather/weather-moon.c @@ -141,6 +141,9 @@ _gweather_info_ensure_moon (GWeatherInfo *info) priv = info->priv; + if (!info->priv->location.latlon_valid) + return; + if (!priv->moonValid) priv->moonValid = calc_moon_internal (priv->current_time, &priv->moonphase, |