From 9520a2b5c1131207095da2685987c201a8ea5d19 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Mon, 7 Mar 2022 14:37:01 -0300 Subject: [PATCH] import-dialog: Only search for non-NULL default calendars The default calendar might be NULL during the initial loading, protect against that. Fixes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/813 --- src/gui/importer/gcal-import-dialog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/importer/gcal-import-dialog.c b/src/gui/importer/gcal-import-dialog.c index 4bc5d5c2..3647107a 100644 --- a/src/gui/importer/gcal-import-dialog.c +++ b/src/gui/importer/gcal-import-dialog.c @@ -106,7 +106,7 @@ update_default_calendar (GcalImportDialog *self) calendars = gcal_manager_get_calendars_model (manager); default_calendar = gcal_manager_get_default_calendar (manager); - if (g_list_store_find (G_LIST_STORE (calendars), default_calendar, &position)) + if (default_calendar && g_list_store_find (G_LIST_STORE (calendars), default_calendar, &position)) adw_combo_row_set_selected (self->calendar_combo_row, position); }