diff pidgin/gtkconv.c @ 28195:d1040bb86b6a

Avoid an assertion when setting a room topic for the first time.
author Paul Aurich <paul@darkrain42.org>
date Fri, 07 Aug 2009 04:21:51 +0000
parents f660386afa66
children 6f27b4d8c1c3
line wrap: on
line diff
--- a/pidgin/gtkconv.c	Fri Aug 07 03:01:22 2009 +0000
+++ b/pidgin/gtkconv.c	Fri Aug 07 04:21:51 2009 +0000
@@ -4365,7 +4365,11 @@
 		return;
 	}
 
-	gtk_entry_set_text(GTK_ENTRY(gtkchat->topic_text), current_topic);
+	if (current_topic)
+		gtk_entry_set_text(GTK_ENTRY(gtkchat->topic_text), current_topic);
+	else
+		gtk_entry_set_text(GTK_ENTRY(gtkchat->topic_text), "");
+
 	prpl_info->set_chat_topic(gc, purple_conv_chat_get_id(PURPLE_CONV_CHAT(conv)),
 			new_topic);