From 2bf6cfe289176ea4998054a46337d9d1e41c4469 Mon Sep 17 00:00:00 2001 From: Michael Catanzaro Date: Thu, 2 Apr 2020 15:31:26 -0500 Subject: [PATCH] Avoid critical on startup when a calendar is broken This is a workaround for evolution-data-server#205. Depending on the resolution of that bug, this might even be the correct fix. --- src/core/gcal-calendar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/gcal-calendar.c b/src/core/gcal-calendar.c index 07f0212b..231904d0 100644 --- a/src/core/gcal-calendar.c +++ b/src/core/gcal-calendar.c @@ -94,7 +94,7 @@ update_color (GcalCalendar *self) selectable_extension = e_source_get_extension (priv->source, E_SOURCE_EXTENSION_CALENDAR); color = e_source_selectable_get_color (selectable_extension); - if (!gdk_rgba_parse (&priv->color, color)) + if (!color || !gdk_rgba_parse (&priv->color, color)) gdk_rgba_parse (&priv->color, "#ffffff"); }