aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2017-01-23 20:56:05 +0000
committerJames Booth <boothj5@gmail.com>2017-01-23 20:56:05 +0000
commitc07341830670819b4dc4a16c56fcac9ad21be16d (patch)
tree69c0fad460e42b2914bc82257c237a8a375f943e /src
parent83385cdbc0106c5aae61d87975a2e082abdbf634 (diff)
downloadprofani-tty-c07341830670819b4dc4a16c56fcac9ad21be16d.tar.gz
Check roster contact before displayng typing notification
fixes #896
Diffstat (limited to 'src')
-rw-r--r--src/ui/core.c8
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;
}