changeset 23177:4d8dced30fa2

Don't try to escape a NULL text. This gets rid of a runtime warning.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 24 May 2008 22:54:06 +0000
parents f3087936d594
children 41171963c986
files pidgin/gtkblist.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkblist.c	Sat May 24 22:49:44 2008 +0000
+++ b/pidgin/gtkblist.c	Sat May 24 22:54:06 2008 +0000
@@ -3336,7 +3336,8 @@
 					g_list_length(purple_conv_chat_get_users(PURPLE_CONV_CHAT(conv))));
 
 			if (prpl_info && (prpl_info->options & OPT_PROTO_CHAT_TOPIC)) {
-				char *topic = g_markup_escape_text(purple_conv_chat_get_topic(PURPLE_CONV_CHAT(conv)), -1);
+				const char *chattopic = purple_conv_chat_get_topic(PURPLE_CONV_CHAT(conv));
+				char *topic = chattopic ? g_markup_escape_text(chattopic, -1) : NULL;
 				g_string_append_printf(str, _("\n<b>Topic:</b> %s"), topic ? topic : _("(no topic set)"));
 				g_free(topic);
 			}