changeset 32225:5a379d8a72c1

Ref/unref the theme for a conversation.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sun, 25 Sep 2011 05:47:54 +0000
parents 459ffa11348e
children 7fcf55606339
files pidgin/gtkconv.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkconv.c	Sat Sep 24 21:19:26 2011 +0000
+++ b/pidgin/gtkconv.c	Sun Sep 25 05:47:54 2011 +0000
@@ -5593,7 +5593,7 @@
 	theme = purple_theme_manager_find_theme(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/conversations/theme"), "conversation");
 	if (!theme)
 		theme = purple_theme_manager_find_theme("Default", "conversation");
-	gtkconv->theme = PIDGIN_CONV_THEME(theme);
+	gtkconv->theme = PIDGIN_CONV_THEME(g_object_ref(theme));
 	gtkconv->last_flags = 0;
 
 	if (conv_type == PURPLE_CONV_TYPE_IM) {
@@ -5798,6 +5798,8 @@
 		g_source_remove(gtkconv->attach.timer);
 	}
 
+	g_object_unref(gtkconv->theme);
+
 	g_free(gtkconv);
 }