changeset 12659:4c50dd655c30

[gaim-migrate @ 15002] basically the same thing as sf patch #1390269, from Kris Marsh "There's a leak when selecting custom saved messages in the status box. Variables title, message do not get cleared up." committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 26 Dec 2005 05:59:24 +0000
parents a0fd3ebcd6fa
children a614eb6c7d9d
files src/gtkstatusbox.c
diffstat 1 files changed, 12 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkstatusbox.c	Sun Dec 25 19:09:25 2005 +0000
+++ b/src/gtkstatusbox.c	Mon Dec 26 05:59:24 2005 +0000
@@ -972,16 +972,9 @@
 
 	if (!gtk_combo_box_get_active_iter(GTK_COMBO_BOX(status_box), &iter))
 		return;
+
 	gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter,
-					   TYPE_COLUMN, &type,
-					   TITLE_COLUMN, &title, -1);
-	message = gtk_gaim_status_box_get_message(status_box);
-
-	if (!message || !*message)
-	{
-		gtk_widget_hide_all(status_box->vbox);
-		status_box->imhtml_visible = FALSE;
-	}
+					   TYPE_COLUMN, &type, -1);
 
 	/*
 	 * If the currently selected status is "Custom..." or
@@ -994,6 +987,16 @@
 	if (type >= GAIM_STATUS_NUM_PRIMITIVES)
 		return;
 
+	gtk_tree_model_get(GTK_TREE_MODEL(status_box->dropdown_store), &iter,
+					   TITLE_COLUMN, &title, -1);
+
+	message = gtk_gaim_status_box_get_message(status_box);
+	if (!message || !*message)
+	{
+		gtk_widget_hide_all(status_box->vbox);
+		status_box->imhtml_visible = FALSE;
+	}
+
 	if (status_box->account) {
 		gint active;
 		GaimStatusType *status_type;