# HG changeset patch # User Mark Doliner # Date 1226480307 0 # Node ID 5b5c21b606900c4c64be8c7c97fb35a47692b26e # Parent 38f4670c3daaf570a24d1826d2a2efd43a806f69 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. diff -r 38f4670c3daa -r 5b5c21b60690 libpurple/protocols/msn/session.c --- 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;