diff options
author | James Booth <boothj5@gmail.com> | 2017-01-23 20:56:05 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2017-01-23 20:56:05 +0000 |
commit | c07341830670819b4dc4a16c56fcac9ad21be16d (patch) | |
tree | 69c0fad460e42b2914bc82257c237a8a375f943e /src/ui/core.c | |
parent | 83385cdbc0106c5aae61d87975a2e082abdbf634 (diff) | |
download | profani-tty-c07341830670819b4dc4a16c56fcac9ad21be16d.tar.gz |
Check roster contact before displayng typing notification
fixes #896
Diffstat (limited to 'src/ui/core.c')
-rw-r--r-- | src/ui/core.c | 8 |
1 files 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; } |