changeset 13713:2cf94cdb2e99

[gaim-migrate @ 16117] Resolve CID 134 Event deref_ptr_in_call: Dereferences pointer "gc" 491 account = gaim_connection_get_account(gc); Event check_after_deref: Pointer "gc" dereferenced before NULL check 496 if (gc != NULL) committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Mon, 01 May 2006 20:47:11 +0000
parents 43ebbe768a43
children 4cf1db3ffada
files src/protocols/jabber/buddy.c
diffstat 1 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/jabber/buddy.c	Mon May 01 20:43:46 2006 +0000
+++ b/src/protocols/jabber/buddy.c	Mon May 01 20:47:11 2006 +0000
@@ -450,7 +450,6 @@
 static void
 jabber_format_info(GaimConnection *gc, GaimRequestFields *fields)
 {
-	GaimAccount *account;
 	xmlnode *vc_node;
 	GaimRequestField *field;
 	const char *text;
@@ -488,13 +487,13 @@
 	p = xmlnode_to_str(vc_node, NULL);
 	xmlnode_free(vc_node);
 
-	account = gaim_connection_get_account(gc);
+	if (gc != NULL) {
+		GaimAccount *account = gaim_connection_get_account(gc);
 
-	if (account != NULL) {
-		gaim_account_set_user_info(account, p);
-
-		if (gc != NULL)
+		if (account != NULL) {
+			gaim_account_set_user_info(account, p);
 			serv_set_info(gc, p);
+		}
 	}
 
 	g_free(p);