diff pidgin/gtkconv.c @ 18290:2e7a9f33cfd3

Handle NULL chat topics
author Sean Egan <seanegan@gmail.com>
date Wed, 27 Jun 2007 16:13:49 +0000
parents c0e14bceee66
children a3469318cf35
line wrap: on
line diff
--- a/pidgin/gtkconv.c	Tue Jun 26 21:47:20 2007 +0000
+++ b/pidgin/gtkconv.c	Wed Jun 27 16:13:49 2007 +0000
@@ -6192,10 +6192,11 @@
 				markup = title;
 		} else if (purple_conversation_get_type(conv) == PURPLE_CONV_TYPE_CHAT) {
 			PurpleConvChat *chat = PURPLE_CONV_CHAT(conv);
-			markup = g_strdup_printf("%s\n<span color='%s' size='smaller'>%s</span>",
+			const char *topic = purple_conv_chat_get_topic(chat);
+			markup = g_strdup_printf("%s%s<span color='%s' size='smaller'>%s</span>",
 						purple_conversation_get_title(conv),
 						pidgin_get_dim_grey_string(gtkconv->infopane),
-						purple_conv_chat_get_topic(chat));
+						topic ? "\n" : "", topic ? topic : "");
 		}
 		gtk_list_store_set(gtkconv->infopane_model, &(gtkconv->infopane_iter),
 				TEXT_COLUMN, markup, -1);