changeset 20855:cfaf74ec93dc

Prevent null pointer deref to fix CID 322.
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 09 Oct 2007 23:33:49 +0000
parents 686a492e2b70
children 306f3c0bccd4
files libpurple/protocols/msn/contact.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/contact.c	Tue Oct 09 23:22:20 2007 +0000
+++ b/libpurple/protocols/msn/contact.c	Tue Oct 09 23:33:49 2007 +0000
@@ -1177,7 +1177,7 @@
 		purple_debug_warning("MSN CL", "Unable to retrieve user %s from the userlist!\n", passport);
 	}
 
-	if (user->uid != NULL) {
+	if (user != NULL && user->uid != NULL) {
 		contact_xml = g_strdup_printf(MSN_CONTACT_ID_XML, user->uid);
 	} else {
 		contact_xml = g_strdup_printf(MSN_CONTACT_XML, passport);