[gnome-todo] task-list-view: plug some nasty crashers
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] task-list-view: plug some nasty crashers
- Date: Thu, 6 Oct 2016 01:16:49 +0000 (UTC)
commit 073168f990c9fe2e9b6e657719ce3a8c2bc8f363
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Oct 5 21:09:13 2016 -0300
task-list-view: plug some nasty crashers
We should always check if the tasklist exists before trying to use it.
src/gtd-task-list-view.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gtd-task-list-view.c b/src/gtd-task-list-view.c
index ee89369..819de15 100644
--- a/src/gtd-task-list-view.c
+++ b/src/gtd-task-list-view.c
@@ -136,7 +136,7 @@ real_save_task (GtdTaskListView *self,
*/
gtd_task_list_save_task (list, task);
- if (priv->task_list != list)
+ if (priv->task_list != list && priv->task_list)
gtd_task_list_save_task (priv->task_list, task);
}
@@ -336,7 +336,7 @@ gtd_task_list_view__remove_task_cb (GtdEditPane *pane,
* the task's list is different from the current list. We want to
* remove the task from ~both~ lists.
*/
- if (priv->task_list != list)
+ if (priv->task_list != list && priv->task_list)
gtd_task_list_remove_task (priv->task_list, task);
gtd_task_list_view__remove_row_for_task (GTD_TASK_LIST_VIEW (user_data), task);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]