From c07341830670819b4dc4a16c56fcac9ad21be16d Mon Sep 17 00:00:00 2001 From: James Booth Date: Mon, 23 Jan 2017 20:56:05 +0000 Subject: [PATCH] Check roster contact before displayng typing notification fixes #896 --- src/ui/core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ui/core.c b/src/ui/core.c index f16080a2..a12bb3ea 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -298,8 +298,12 @@ ui_contact_typing(const char *const barejid, const char *const resource) if ( !is_current || (is_current && prefs_get_boolean(PREF_NOTIFY_TYPING_CURRENT)) ) { PContact contact = roster_get_contact(barejid); char const *display_usr = NULL; - if (p_contact_name(contact)) { - display_usr = p_contact_name(contact); + if (contact) { + if (p_contact_name(contact)) { + display_usr = p_contact_name(contact); + } else { + display_usr = barejid; + } } else { display_usr = barejid; }