changeset 18855:28a7c9dbbc2b

Fix uninitialized variable access.
author Daniel Atallah <daniel.atallah@gmail.com>
date Thu, 09 Aug 2007 18:58:07 +0000
parents 2516cf81b763
children 5da32c4019ce
files libpurple/protocols/jabber/jabber.c
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Thu Aug 09 18:34:01 2007 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Thu Aug 09 18:58:07 2007 +0000
@@ -1718,7 +1718,7 @@
 static PurpleCmdRet jabber_cmd_chat_role(PurpleConversation *conv,
 		const char *cmd, char **args, char **error, void *data)
 {
-	JabberChat *chat;
+	JabberChat *chat = jabber_chat_find_by_conv(conv);
 
 	if (!chat || !args || !args[0] || !args[1])
 		return PURPLE_CMD_RET_FAILED;
@@ -1731,8 +1731,6 @@
 		return PURPLE_CMD_RET_FAILED;
 	}
 
-	chat = jabber_chat_find_by_conv(conv);
-
 	if (!jabber_chat_role_user(chat, args[0], args[1])) {
 		*error = g_strdup_printf(_("Unable to set role \"%s\" for user: %s"),
 		                         args[1], args[0]);