diff options
Diffstat (limited to 'src/ui/core.c')
-rw-r--r-- | src/ui/core.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ui/core.c b/src/ui/core.c index 580f8691..6c3ed470 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -1258,10 +1258,14 @@ _ui_recipient_gone(const char * const barejid) if (barejid == NULL) return; - PContact contact = roster_get_contact(barejid); const char * display_usr = NULL; - if (p_contact_name(contact) != NULL) { - display_usr = p_contact_name(contact); + PContact contact = roster_get_contact(barejid); + if (contact != NULL) { + if (p_contact_name(contact) != NULL) { + display_usr = p_contact_name(contact); + } else { + display_usr = barejid; + } } else { display_usr = barejid; } |