[gnome-todo] manager: do not ask update task without parent list



commit 8afb0d9bf3793717072f67d794ee787dd3bd3fe8
Author: Victor Toso <me victortoso com>
Date:   Tue Nov 8 22:27:20 2016 +0100

    manager: do not ask update task without parent list
    
    This situation is fairly possible when gnome-todo is being terminated.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774120

 src/engine/gtd-manager.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/engine/gtd-manager.c b/src/engine/gtd-manager.c
index 509469e..88e03f2 100644
--- a/src/engine/gtd-manager.c
+++ b/src/engine/gtd-manager.c
@@ -604,6 +604,11 @@ gtd_manager_update_task (GtdManager *manager,
   g_return_if_fail (GTD_IS_TASK (task));
 
   list = gtd_task_get_list (task);
+
+  /* Task does not have parent list, nothing we can do */
+  if (!list)
+      return;
+
   provider = gtd_task_list_get_provider (list);
 
   gtd_provider_update_task (provider, task);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]