aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/calendar-component.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/calendar-component.c')
-rw-r--r--calendar/gui/calendar-component.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c
index 0f6b0393ef..db6fdabe7d 100644
--- a/calendar/gui/calendar-component.c
+++ b/calendar/gui/calendar-component.c
@@ -379,6 +379,8 @@ delete_calendar_cb (GtkWidget *widget, CalendarComponent *comp)
/* first, ask the backend to remove the calendar */
uri = e_source_get_uri (selected_source);
cal = e_cal_model_get_client_for_uri (gnome_calendar_get_calendar_model (priv->calendar), uri);
+ if (!cal)
+ cal = e_cal_new_from_uri (uri, E_CAL_SOURCE_TYPE_EVENT);
g_free (uri);
if (cal) {
if (e_cal_remove (cal, NULL)) {