Do not crash when displaying the tooltip of an old user

This commit is contained in:
mjentsch 2015-10-17 21:16:28 +02:00
parent 306273d4c4
commit bd7662aaeb

View file

@ -420,7 +420,9 @@ static const char *tgprpl_list_icon (PurpleAccount *acct, PurpleBuddy *buddy) {
}
static void tgprpl_tooltip_text (PurpleBuddy *buddy, PurpleNotifyUserInfo *info, gboolean full) {
debug ("tgprpl_tooltip_text()");
if (! tgp_blist_buddy_has_id (buddy)) {
return;
}
tgl_peer_t *P = tgl_peer_get (pbn_get_conn (&buddy->node)->TLS, tgp_blist_buddy_get_id (buddy));
if (!P) {
failure ("Peer %s not found in tree.", buddy->name);