[gnome-todo] manager: avoid several criticals due empty list
- From: Victor Toso de Carvalho <victortoso src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] manager: avoid several criticals due empty list
- Date: Fri, 28 Oct 2016 19:13:33 +0000 (UTC)
commit 8d15acb5250b32c93e4669e932572e8d8d1dea3c
Author: Victor Toso <me victortoso com>
Date: Thu Oct 27 17:38:23 2016 +0200
manager: avoid several criticals due empty list
GLib-GObject-WARNING **: invalid (NULL) pointer instance
GLib-GObject-CRITICAL **: g_signal_handlers_disconnect_matched:
assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
Signed-off-by: Victor Toso <victortoso redhat com>
https://bugzilla.gnome.org/show_bug.cgi?id=773590
src/engine/gtd-manager.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/engine/gtd-manager.c b/src/engine/gtd-manager.c
index 125fcfa..509469e 100644
--- a/src/engine/gtd-manager.c
+++ b/src/engine/gtd-manager.c
@@ -440,6 +440,9 @@ gtd_manager__list_removed (GtdProvider *provider,
{
GtdManagerPrivate *priv = gtd_manager_get_instance_private (self);
+ if (!list)
+ return;
+
priv->tasklists = g_list_remove (priv->tasklists, list);
g_signal_handlers_disconnect_by_func (list,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]