Ah, however to fix this crash (bug #861144) I guess that we only need (at the current state) to add a
g_return_if_fail (object);
In the panel_service_show_entry function. I forgot to add it previously, and I'd suggest to use this check always, after that the entry_id has been parsed, leaving the old get_entry_by_id implementation.
Otherwise we'll duplicate the number of hashtable lookups.
Otherwise using something like
void panel_service_get_indicator_entry_by_id(PanelService *self, IndicatorObject **io, IndicatorObjectEntry **entry);
To get also the IndicatorObject and to avoid further lookups.
A simple way to optimize all these operations, by the way, would be to link an entry to its own parent indicator (also if this could lead to other issues, though).
Ah, however to fix this crash (bug #861144) I guess that we only need (at the current state) to add a
g_return_if_fail (object);
In the panel_service_ show_entry function. I forgot to add it previously, and I'd suggest to use this check always, after that the entry_id has been parsed, leaving the old get_entry_by_id implementation.
Otherwise we'll duplicate the number of hashtable lookups.
Otherwise using something like get_indicator_ entry_by_ id(PanelService *self, IndicatorObject **io, IndicatorObject Entry **entry);
void panel_service_
To get also the IndicatorObject and to avoid further lookups.
A simple way to optimize all these operations, by the way, would be to link an entry to its own parent indicator (also if this could lead to other issues, though).