[libgweather] test_locations: don't warn if the current location is null
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgweather] test_locations: don't warn if the current location is null
- Date: Fri, 1 Aug 2014 09:37:17 +0000 (UTC)
commit 8f788d826dc0deef4ad09b2e6db0a98b91ed3f3a
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Fri Aug 1 11:36:35 2014 +0200
test_locations: don't warn if the current location is null
It's a perfectly legitimate condition when clearing the entry
https://bugzilla.gnome.org/show_bug.cgi?id=732728
libgweather/test_locations.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libgweather/test_locations.c b/libgweather/test_locations.c
index afeffb9..40d1b94 100644
--- a/libgweather/test_locations.c
+++ b/libgweather/test_locations.c
@@ -17,7 +17,9 @@ location_changed (GObject *object, GParamSpec *param, gpointer tzmenu)
GWeatherTimezone *zone;
loc = gweather_location_entry_get_location (entry);
- g_return_if_fail (loc != NULL);
+ if (loc == NULL)
+ return;
+
zone = gweather_location_get_timezone (loc);
if (zone)
gweather_timezone_menu_set_tzid (tzmenu, gweather_timezone_get_tzid (zone));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]