[gnome-calendar] import-dialog: Only search for non-NULL default calendars
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] import-dialog: Only search for non-NULL default calendars
- Date: Mon, 7 Mar 2022 17:37:47 +0000 (UTC)
commit 9520a2b5c1131207095da2685987c201a8ea5d19
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Mar 7 14:37:01 2022 -0300
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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]