Don't try to escape a NULL text. This gets rid of a runtime warning.

Sat, 24 May 2008 22:54:06 +0000

author
Sadrul Habib Chowdhury <sadrul@pidgin.im>
date
Sat, 24 May 2008 22:54:06 +0000
changeset 23318
eb8dd6f2441c
parent 23317
dba466df7ed0
child 23319
987080575fde

Don't try to escape a NULL text. This gets rid of a runtime warning.

pidgin/gtkblist.c file | annotate | diff | comparison | revisions
--- 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);
 			}

mercurial