[gnome-calendar/mcatanzaro/parse-color] Avoid critical on startup when a calendar is broken



commit f4790ecb93b3e9636d1d423d6f197017ad86c873
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Thu Apr 2 15:31:26 2020 -0500

    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..8c03cf7e 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");
 }
 


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