[gnome-todo] edit-pane: check if binding is still valid
- From: Victor Toso de Carvalho <victortoso src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] edit-pane: check if binding is still valid
- Date: Thu, 13 Oct 2016 16:35:00 +0000 (UTC)
commit 44a6a470903602d293d259a0b3ee4a70f83571d1
Author: Victor Toso <me victortoso com>
Date: Sun Oct 2 23:40:25 2016 +0200
edit-pane: check if binding is still valid
It might not be valid on dispose:
"The binding will automatically be removed when either the source or
the target instances are finalized."
https://bugzilla.gnome.org/show_bug.cgi?id=772178
src/gtd-edit-pane.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/gtd-edit-pane.c b/src/gtd-edit-pane.c
index 9903e8a..780b99f 100644
--- a/src/gtd-edit-pane.c
+++ b/src/gtd-edit-pane.c
@@ -375,8 +375,10 @@ gtd_edit_pane_set_task (GtdEditPane *pane,
if (priv->task)
{
- g_clear_pointer (&priv->notes_binding, g_binding_unbind);
- g_clear_pointer (&priv->priority_binding, g_binding_unbind);
+ if (G_IS_BINDING (priv->notes_binding))
+ g_clear_pointer (&priv->notes_binding, g_binding_unbind);
+ if (G_IS_BINDING (priv->priority_binding))
+ g_clear_pointer (&priv->priority_binding, g_binding_unbind);
g_signal_handlers_disconnect_by_func (gtk_text_view_get_buffer (priv->notes_textview),
gtd_edit_pane__task_changed_cb, pane);
g_signal_handlers_disconnect_by_func (priv->priority_combo,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]