[gnome-calendar] quick-add-popover: Only remove existing rows
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] quick-add-popover: Only remove existing rows
- Date: Sun, 28 Jan 2018 14:47:45 +0000 (UTC)
commit 09b986f526e2c67c5b457f3599640511c8f90d0a
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sun Jan 28 12:45:57 2018 -0200
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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]