[evolution-data-server] Relax runtime check in e_cal_util_get_system_timezone()



commit 2aad02605913fc6c8e4ba7d0bf58497a57a9044c
Author: Milan Crha <mcrha redhat com>
Date:   Fri Nov 30 16:56:25 2018 +0100

    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.

 src/calendar/libecal/e-cal-util.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
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);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]