changeset 24328:5b5c21b60690

Get rid of an unnecessary if statement, and don't try to unref a null icon when you don't have an icon set on msn.
author Mark Doliner <mark@kingant.net>
date Wed, 12 Nov 2008 08:58:27 +0000
parents 38f4670c3daa
children 6e4979001d6d
files libpurple/protocols/msn/session.c
diffstat 1 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/session.c	Wed Nov 12 04:18:54 2008 +0000
+++ b/libpurple/protocols/msn/session.c	Wed Nov 12 08:58:27 2008 +0000
@@ -118,12 +118,7 @@
 		g_return_val_if_reached(FALSE);
 	}
 
-	if (msn_notification_connect(session->notification, host, port))
-	{
-		return TRUE;
-	}
-
-	return FALSE;
+	return msn_notification_connect(session->notification, host, port);
 }
 
 void
@@ -460,8 +455,10 @@
 	gc = purple_account_get_connection(account);
 
 	img = purple_buddy_icons_find_account_icon(session->account);
+	/* TODO: Do we really want to call this if img is NULL? */
 	msn_user_set_buddy_icon(session->user, img);
-	purple_imgstore_unref(img);
+	if (img != NULL)
+		purple_imgstore_unref(img);
 
 	session->logged_in = TRUE;