weather-settings: Only deserialize valid locations

This commit is contained in:
Georges Basile Stavracas Neto
2018-01-27 23:32:21 -02:00
parent fe53414b07
commit 9424d8f3cc
+1 -1
View File
@@ -111,7 +111,7 @@ load_weather_settings (GcalWeatherSettings *self)
GWeatherLocation *world; GWeatherLocation *world;
world = gweather_location_get_world (); world = gweather_location_get_world ();
weather_location = gweather_location_deserialize (world, location); weather_location = location ? gweather_location_deserialize (world, location) : NULL;
gweather_location_entry_set_location (GWEATHER_LOCATION_ENTRY (self->weather_location_entry), weather_location); gweather_location_entry_set_location (GWEATHER_LOCATION_ENTRY (self->weather_location_entry), weather_location);
} }