changeset 27613:32d2caa6a777

Commit the QQ null chat room name crash on the *right* branch. *** Plucked rev d3a2bc4e480b1ff46d215d1622464bd613a5286d (darkrain42@pidgin.im): Fix a crash when joining a chat room with NULL name. Closes #7568.
author Paul Aurich <paul@darkrain42.org>
date Tue, 14 Jul 2009 19:55:40 +0000
parents 18a96fe78870
children fa827f6f990f d953b613a794 e574d1858b5a
files libpurple/protocols/qq/group_im.c libpurple/server.c
diffstat 2 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/qq/group_im.c	Tue Jul 14 17:56:13 2009 +0000
+++ b/libpurple/protocols/qq/group_im.c	Tue Jul 14 19:55:40 2009 +0000
@@ -52,6 +52,7 @@
 	gchar *topic_utf8;
 
 	g_return_val_if_fail(rmd != NULL, NULL);
+	g_return_val_if_fail(rmd->title_utf8, NULL);
 	qd = (qq_data *) gc->proto_data;
 
 	conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_CHAT,
--- a/libpurple/server.c	Tue Jul 14 17:56:13 2009 +0000
+++ b/libpurple/server.c	Tue Jul 14 19:55:40 2009 +0000
@@ -862,7 +862,12 @@
 
 	account = purple_connection_get_account(gc);
 
+	g_return_val_if_fail(account != NULL, NULL);
+	g_return_val_if_fail(name != NULL, NULL);
+
 	conv = purple_conversation_new(PURPLE_CONV_TYPE_CHAT, account, name);
+	g_return_val_if_fail(conv != NULL, NULL);
+
 	chat = PURPLE_CONV_CHAT(conv);
 
 	if (!g_slist_find(gc->buddy_chats, conv))