[glade] Fixed runtime warning on GladeBaseEditor and GladeSignalEditor dispose methods
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] Fixed runtime warning on GladeBaseEditor and GladeSignalEditor dispose methods
- Date: Fri, 7 Sep 2012 00:44:50 +0000 (UTC)
commit b25ee612bca1e8026b423814c157a2bc458b76df
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date: Thu Sep 6 20:08:30 2012 -0300
Fixed runtime warning on GladeBaseEditor and GladeSignalEditor dispose methods
gladeui/glade-base-editor.c | 4 ++--
gladeui/glade-signal-editor.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gladeui/glade-base-editor.c b/gladeui/glade-base-editor.c
index 1646b4a..bee866f 100644
--- a/gladeui/glade-base-editor.c
+++ b/gladeui/glade-base-editor.c
@@ -308,8 +308,8 @@ static gboolean
glade_base_editor_get_child_selected (GladeBaseEditor *e, GtkTreeIter *iter)
{
GtkTreeSelection *sel =
- gtk_tree_view_get_selection (GTK_TREE_VIEW (e->priv->treeview));
- return gtk_tree_selection_get_selected (sel, NULL, iter);
+ gtk_tree_view_get_selection (GTK_TREE_VIEW (e->priv->treeview));
+ return (sel) ? gtk_tree_selection_get_selected (sel, NULL, iter) : FALSE;
}
/* Forward declaration for glade_base_editor_project_widget_name_changed */
diff --git a/gladeui/glade-signal-editor.c b/gladeui/glade-signal-editor.c
index b984a66..2e81f7c 100644
--- a/gladeui/glade-signal-editor.c
+++ b/gladeui/glade-signal-editor.c
@@ -714,8 +714,8 @@ glade_signal_editor_dispose (GObject *object)
{
GladeSignalEditorPrivate *priv = GLADE_SIGNAL_EDITOR_GET_PRIVATE (object);
- g_object_unref (priv->detail_store);
- g_object_unref (priv->handler_store);
+ g_clear_object (&priv->detail_store);
+ g_clear_object (&priv->handler_store);
G_OBJECT_CLASS (glade_signal_editor_parent_class)->dispose (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]