about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-08-21 22:34:50 +0100
committerJames Booth <boothj5@gmail.com>2014-08-21 22:35:14 +0100
commit0b47bba6cc8ab5267aebb7eeb8f691f87140184d (patch)
tree2a11b3a5e049ee2d08c4246700b96f6eafdb8aac /src/ui
parent9fd45059eb0f845afbe097e5a4478130b9571f99 (diff)
downloadprofani-tty-0b47bba6cc8ab5267aebb7eeb8f691f87140184d.tar.gz
Check window exsists before doing incoming typing notifications
issue #397
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ui/core.c b/src/ui/core.c
index c4226062..5a47f551 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -279,7 +279,10 @@ _ui_contact_typing(const char * const barejid)
     }
 
     if (prefs_get_boolean(PREF_NOTIFY_TYPING)) {
-        gboolean is_current = wins_is_current(window);
+        gboolean is_current = FALSE;
+        if (window != NULL) {
+            is_current = wins_is_current(window);
+        }
         if ( !is_current || (is_current && prefs_get_boolean(PREF_NOTIFY_TYPING_CURRENT)) ) {
             PContact contact = roster_get_contact(barejid);
             char const *display_usr = NULL;