e-source-selectable: Add annotations to developer comments
e_source_selectable_get_color() may return NULL, but it's not annotated as ~~(transfer none)~` (allow none). This is causing crashes when starting gnome-calendar. Either the return annotation should be fixed to allow NULL, or the function should return an empty string instead of NULL. CC: @feaneron
(gnome-calendar:78416): Gdk-CRITICAL **: 14:47:39.746: gdk_rgba_parse: assertion 'spec != NULL' failed
(gdb) bt full
#0 g_logv
(log_domain=0x7ffff6c2c615 "Gdk", log_level=G_LOG_LEVEL_CRITICAL, format=<optimized out>, args=<optimized out>)
at ../glib/gmessages.c:1377
domain = 0x0
data = 0x0
depth = 0
log_func = 0x7ffff74d0bc0 <g_log_default_handler>
domain_fatal_mask = <optimized out>
masquerade_fatal = <optimized out>
test_level = <optimized out>
was_fatal = <optimized out>
was_recursion = <optimized out>
msg = 0x604000072010 "gdk_rgba_parse: assertion 'spec != NULL' failed"
msg_alloc = 0x604000072010 "gdk_rgba_parse: assertion 'spec != NULL' failed"
i = 3
#1 0x00007ffff74d1163 in g_log (log_domain=<optimized out>, log_level=<optimized out>, format=<optimized out>)
at ../glib/gmessages.c:1415
args = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fffd66db730, reg_save_area = 0x7fffd66db670}}
#2 0x00007ffff6b999f6 in gdk_rgba_parse (rgba=0x621000140b00, spec=0x0)
at /home/mcatanzaro/Projects/gtk/gdk/gdkrgba.c:169
has_alpha = 32767
r = 6.9533478013934577e-310
g = 8.6916516863780323e-311
b = 6.9533213491024258e-310
a = 6.9533213491024258e-310
str = 0x0
p = 0x621000136870 " \266\002"
__func__ = "gdk_rgba_parse"
#3 0x000000000045e513 in update_color (self=0x621000140b60 [GcalCalendar])
at ../../../../Projects/gnome-calendar/src/core/gcal-calendar.c:97
priv = 0x621000140b00
selectable_extension = 0x621000136870 [ESourceCalendar]
color = 0x0
#4 0x000000000045e996 in gcal_calendar_initable_init
(initable=0x621000140b60, cancellable=0x0, error=0x7fffd66db8c0)
at ../../../../Projects/gnome-calendar/src/core/gcal-calendar.c:185
priv = 0x621000140b00
client = 0x0
local_error = 0x0
selectable_extension = 0x621000136870 [ESourceCalendar]
self = 0x621000140b60 [GcalCalendar]
__func__ = "gcal_calendar_initable_init"
I'm going to add a workaround in gnome-calendar to NULL-check the result.
Edited by Michael Catanzaro