changeset 18550:925ba3e6831c

cmd->params[2] could be NULL, or purple_url_decode() could return NULL. Don't pass a potential NULL to strcmp().
author Evan Schoenberg <evan.s@dreskin.net>
date Sat, 14 Jul 2007 18:16:51 +0000
parents 70509e165225
children d5cf2c466e9a
files libpurple/protocols/msn/notification.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/notification.c	Sat Jul 14 10:52:31 2007 +0000
+++ b/libpurple/protocols/msn/notification.c	Sat Jul 14 18:16:51 2007 +0000
@@ -705,7 +705,7 @@
 	user = msn_userlist_find_user(session->userlist, passport);
 
 	old_friendly = msn_user_get_friendly_name(user);
-	if (!old_friendly || (old_friendly && strcmp(old_friendly, friendly)))
+	if (!old_friendly || (old_friendly && (!friendly || strcmp(old_friendly, friendly))))
 	{
 		serv_got_alias(gc, passport, friendly);
 		msn_user_set_friendly_name(user, friendly);