# HG changeset patch # User andrew.victor@mxit.com # Date 1301602518 0 # Node ID a769e6da0a8eee15da9134ee09c83bc44d4a6a6b # Parent 9e9abd65b840b16ab4d04a9bac20fb4a55f25e61 The mini-dialogs feature now allows you to request profile information for pending invites before accepting them. Since it's an invite there is no PurpleBuddy associated with the user, and therefore we cannot perform the contact-type check. So just skip the check if we cannot find the buddy. diff -r 9e9abd65b840 -r a769e6da0a8e libpurple/protocols/mxit/mxit.c --- a/libpurple/protocols/mxit/mxit.c Thu Mar 31 19:32:34 2011 +0000 +++ b/libpurple/protocols/mxit/mxit.c Thu Mar 31 20:15:18 2011 +0000 @@ -571,19 +571,17 @@ /* find the buddy information for this contact (reference: "libpurple/blist.h") */ buddy = purple_find_buddy( session->acc, who ); - if ( !buddy ) { - purple_debug_warning( MXIT_PLUGIN_ID, "mxit_get_info: unable to find the buddy '%s'\n", who ); - return; - } + if ( buddy ) { + /* user is in our contact-list, so it's not an invite */ + contact = purple_buddy_get_protocol_data( buddy ); + if ( !contact ) + return; - contact = purple_buddy_get_protocol_data( buddy ); - if ( !contact ) - return; - - /* only MXit users have profiles */ - if ( contact->type != MXIT_TYPE_MXIT ) { - mxit_popup( PURPLE_NOTIFY_MSG_WARNING, _( "No profile available" ), _( "This contact does not have a profile." ) ); - return; + /* only MXit users have profiles */ + if ( contact->type != MXIT_TYPE_MXIT ) { + mxit_popup( PURPLE_NOTIFY_MSG_WARNING, _( "No profile available" ), _( "This contact does not have a profile." ) ); + return; + } } /* send profile request */