Mercurial > pidgin
view libpurple/dbus-define-api.h @ 31203:258fec7797b9
Attempt to fix a crash I've seen a few times. I think it happens if you
have a conversation window open with a MySpace buddy, then your MySpace
account goes offline. We apparently call the prpl's status_text prpl
function to get the status text for the buddy, but the connection is
offline. I don't know if that's something we SHOULD do or not... but
other prpl's seem to handle this, at least.
1. Use buddy->account instead of buddy->account->gc->proto_data->account,
since the former should always exist and later doesn't exist if the
account is offline. This was leading to a null pointer dereference.
2. Pass FALSE to msim_get_user_from_buddy() so that it will stop creating
an MsimUser struct if one doesn't exist. Creating it didn't accomplish
anything, and I feel like it might never get freed if the account is
already offline.
3. Put the checks for user->headline and user->display_name in a big
if condition, so we won't try to grab that info if user is NULL
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 14 Feb 2011 01:01:37 +0000 |
parents | 32c366eeeb99 |
children |
line wrap: on
line source
#error "This is file is not a valid C code" /* This file contains some of the macros from other header files as function declarations. This does not make sense in C, but it provides type information for the dbus-analyze-functions.py program, which makes these macros callable by DBUS. */ /* blist.h */ gboolean PURPLE_BLIST_NODE_IS_CHAT(PurpleBlistNode *node); gboolean PURPLE_BLIST_NODE_IS_BUDDY(PurpleBlistNode *node); gboolean PURPLE_BLIST_NODE_IS_CONTACT(PurpleBlistNode *node); gboolean PURPLE_BLIST_NODE_IS_GROUP(PurpleBlistNode *node); gboolean PURPLE_BUDDY_IS_ONLINE(PurpleBuddy *buddy); gboolean PURPLE_BLIST_NODE_HAS_FLAG(PurpleBlistNode *node, int flags); gboolean PURPLE_BLIST_NODE_SHOULD_SAVE(PurpleBlistNode *node); /* connection.h */ gboolean PURPLE_CONNECTION_IS_CONNECTED(PurpleConnection *connection); gboolean PURPLE_CONNECTION_IS_VALID(PurpleConnection *connection); /* conversation.h */ PurpleConvIm *PURPLE_CONV_IM(const PurpleConversation *conversation); PurpleConvIm *PURPLE_CONV_CHAT(const PurpleConversation *conversation);