diff options
author | Milan Crha <mcrha@redhat.com> | 2018-11-30 16:56:25 +0100 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2018-11-30 16:56:25 +0100 |
commit | 2aad02605913fc6c8e4ba7d0bf58497a57a9044c (patch) | |
tree | 61be2f330982f4c44475139cfbfc5fcdc53fc2a0 | |
parent | ec2d98f052ac47dcec033737e4d6d3a2c81bcd11 (diff) | |
download | evolution-data-server-2aad02605913fc6c8e4ba7d0bf58497a57a9044c.tar.gz |
Relax runtime check in e_cal_util_get_system_timezone()
This runtime warning had been shown when running Evolution in Flatpak
with GNOME 3.30 runtime. It had been due to libical not finding
tzdata file in the expected directory. Let's relax the runtime
warning, because it can happen the time zone detection fails, even
in a corner case.
-rw-r--r-- | src/calendar/libecal/e-cal-util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/calendar/libecal/e-cal-util.c b/src/calendar/libecal/e-cal-util.c index 069e7e7a0..28c8a52a0 100644 --- a/src/calendar/libecal/e-cal-util.c +++ b/src/calendar/libecal/e-cal-util.c @@ -1583,7 +1583,10 @@ e_cal_util_get_system_timezone (void) icaltimezone *zone; location = e_cal_system_timezone_get_location (); - g_return_val_if_fail (location != NULL, NULL); + + /* Can be NULL when failed to detect system time zone */ + if (!location) + return NULL; zone = icaltimezone_get_builtin_timezone (location); |