diff options
Diffstat (limited to 'calendar/gui/calendar-component.c')
-rw-r--r-- | calendar/gui/calendar-component.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index 2158f2a32d..58e82057cd 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -209,7 +209,7 @@ static void update_primary_selection (CalendarComponent *calendar_component) { CalendarComponentPrivate *priv; - ESource *source; + ESource *source = NULL; char *uid; priv = calendar_component->priv; @@ -218,11 +218,11 @@ update_primary_selection (CalendarComponent *calendar_component) if (uid) { source = e_source_list_peek_source_by_uid (priv->source_list, uid); g_free (uid); + } + if (source) { e_source_selector_set_primary_selection (E_SOURCE_SELECTOR (priv->source_selector), source); } else { - ESource *source; - /* Try to create a default if there isn't one */ source = e_source_list_peek_source_any (priv->source_list); if (source) |