From bd7662aaeb1806d9f24b1a76d7a3c4d4d31b1d64 Mon Sep 17 00:00:00 2001 From: mjentsch Date: Sat, 17 Oct 2015 21:16:28 +0200 Subject: [PATCH] Do not crash when displaying the tooltip of an old user --- telegram-purple.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/telegram-purple.c b/telegram-purple.c index 433e690..20b946c 100644 --- a/telegram-purple.c +++ b/telegram-purple.c @@ -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);