[Pidgin] #8180: Crash on removing an unknown prpl's account

Pidgin trac at pidgin.im
Mon Jan 19 20:05:49 EST 2009


#8180: Crash on removing an unknown prpl's account
------------------------+---------------------------------------------------
 Reporter:  darkrain42  |     Owner:       
     Type:  patch       |    Status:  new  
Component:  libpurple   |   Version:  2.5.4
 Keywords:              |  
------------------------+---------------------------------------------------
 Someone in #pidgin reported a crash when removing an account for which the
 prpl isn't around. Here's the fix:

 {{{
 --- libpurple/blist.c   fa7ccb5d88f66b272a2664e86da870d6991381d2
 +++ libpurple/blist.c   2179c8dd77c554ce7da1d1bbf99dfd4a52910da8
 @@ -1811,7 +1811,7 @@ void purple_blist_remove_buddy(PurpleBud
         PurpleGroup *group;
         struct _purple_hbuddy hb;
         PurplePlugin *prpl;
 -       PurplePluginProtocolInfo *prpl_info;
 +       PurplePluginProtocolInfo *prpl_info = NULL;

         g_return_if_fail(buddy != NULL);

 @@ -1872,7 +1872,8 @@ void purple_blist_remove_buddy(PurpleBud
          * can free proto_data
          */
         prpl =
 purple_find_prpl(purple_account_get_protocol_id(buddy->account));
 -       prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
 +       if (prpl)
 +               prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(prpl);
         if (prpl_info && prpl_info->buddy_free)
                 prpl_info->buddy_free(buddy);

 }}}

-- 
Ticket URL: <http://developer.pidgin.im/ticket/8180>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list