From 09b986f526e2c67c5b457f3599640511c8f90d0a Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Sun, 28 Jan 2018 12:45:57 -0200 Subject: [PATCH] quick-add-popover: Only remove existing rows We can receive the source-changed signal on read-only sources, and these sources have no row associated. Trying to remove the non-existing row would yield a warning. --- src/gcal-quick-add-popover.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gcal-quick-add-popover.c b/src/gcal-quick-add-popover.c index 093f8156..f5fd7ada 100644 --- a/src/gcal-quick-add-popover.c +++ b/src/gcal-quick-add-popover.c @@ -536,7 +536,9 @@ on_source_changed (GcalManager *manager, /* If the calendar changed from/to read-only, we add or remove it here */ if (!gcal_manager_is_client_writable (self->manager, source)) { - gtk_container_remove (GTK_CONTAINER (self->calendars_listbox), row); + if (row) + gtk_container_remove (GTK_CONTAINER (self->calendars_listbox), row); + return; } else if (!row)