[gnome-todo] sidebar: Be resilient against NULL rows
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] sidebar: Be resilient against NULL rows
- Date: Sat, 20 Jul 2019 22:15:34 +0000 (UTC)
commit cc7277f1e173a5f3f79f0dd61d4152156524189a
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Sat Jul 20 19:02:20 2019 -0300
sidebar: Be resilient against NULL rows
Instead of asserting for non-NULL list rows, which
is something we can eventually need to deal with,
handle it gracefully with an early return.
src/sidebar/gtd-sidebar.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/sidebar/gtd-sidebar.c b/src/sidebar/gtd-sidebar.c
index 8aec016..dcc0f4d 100644
--- a/src/sidebar/gtd-sidebar.c
+++ b/src/sidebar/gtd-sidebar.c
@@ -525,7 +525,8 @@ on_task_list_removed_cb (GtdManager *manager,
listbox = self->archive_listbox;
row = get_row_for_task_list (self, listbox, list);
- g_assert (row != NULL);
+ if (!row)
+ return;
gtk_widget_destroy (GTK_WIDGET (row));
gtk_list_box_invalidate_filter (listbox);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]