aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-source-selector.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-10-25 23:53:11 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-10-25 23:53:11 +0800
commit9009fc58c48a7f415687076577c1598182c18e75 (patch)
tree269d07eb9332fe6e4ca24a7ea1e0589cae98e009 /e-util/e-source-selector.c
parent6ea6096c807b2d1e5da8743a5906209d83099a71 (diff)
downloadgsoc2013-evolution-9009fc58c48a7f415687076577c1598182c18e75.tar
gsoc2013-evolution-9009fc58c48a7f415687076577c1598182c18e75.tar.gz
gsoc2013-evolution-9009fc58c48a7f415687076577c1598182c18e75.tar.bz2
gsoc2013-evolution-9009fc58c48a7f415687076577c1598182c18e75.tar.lz
gsoc2013-evolution-9009fc58c48a7f415687076577c1598182c18e75.tar.xz
gsoc2013-evolution-9009fc58c48a7f415687076577c1598182c18e75.tar.zst
gsoc2013-evolution-9009fc58c48a7f415687076577c1598182c18e75.zip
ESourceSelector: Fix a reference leak in text_cell_edited_cb().
We were leaking the ESource reference.
Diffstat (limited to 'e-util/e-source-selector.c')
-rw-r--r--e-util/e-source-selector.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/e-util/e-source-selector.c b/e-util/e-source-selector.c
index 71c902ce38..2044d5f772 100644
--- a/e-util/e-source-selector.c
+++ b/e-util/e-source-selector.c
@@ -561,23 +561,25 @@ text_cell_edited_cb (ESourceSelector *selector,
GtkTreeIter iter;
ESource *source;
+ if (new_name == NULL || *new_name == '\0')
+ return;
+
+ if (same_source_name_exists (selector, new_name))
+ return;
+
tree_view = GTK_TREE_VIEW (selector);
model = gtk_tree_view_get_model (tree_view);
- path = gtk_tree_path_new_from_string (path_string);
+ path = gtk_tree_path_new_from_string (path_string);
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get (model, &iter, COLUMN_SOURCE, &source, -1);
gtk_tree_path_free (path);
- if (new_name == NULL || *new_name == '\0')
- return;
-
- if (same_source_name_exists (selector, new_name))
- return;
-
e_source_set_display_name (source, new_name);
e_source_selector_queue_write (selector, source);
+
+ g_object_unref (source);
}
static void