[gnome-todo] task-list-view: reset dnd row when removing a task
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] task-list-view: reset dnd row when removing a task
- Date: Wed, 26 Oct 2016 02:18:33 +0000 (UTC)
commit 4b50aa982b6c28a7414417e2c25c9fca4f14f9ed
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Oct 26 00:18:05 2016 -0200
task-list-view: reset dnd row when removing a task
Avoid a nasty segmentation fault.
src/gtd-task-list-view.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/gtd-task-list-view.c b/src/gtd-task-list-view.c
index 54ea640..2f53586 100644
--- a/src/gtd-task-list-view.c
+++ b/src/gtd-task-list-view.c
@@ -637,6 +637,12 @@ gtd_task_list_view__remove_task_cb (GtdEditPane *pane,
remove_task_from_list,
FALSE);
+ /*
+ * Reset the DnD row, to avoid getting into an inconsistent state where
+ * the DnD row points to a row that is not present anymore.
+ */
+ gtd_dnd_row_set_row_above (GTD_DND_ROW (priv->dnd_row), NULL);
+
/* Hide the edit panel */
gtk_revealer_set_reveal_child (priv->edit_revealer, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]