about summary refs log tree commit diff stats
path: root/src/xmpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmpp')
-rw-r--r--src/xmpp/session.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/xmpp/session.c b/src/xmpp/session.c
index 0478fec3..95930802 100644
--- a/src/xmpp/session.c
+++ b/src/xmpp/session.c
@@ -397,7 +397,11 @@ session_check_autoaway(void)
                     if (saved_status) {
                         free(saved_status);
                     }
-                    saved_status = strdup(curr_status);
+                    if (curr_status) {
+                        saved_status = strdup(curr_status);
+                    } else {
+                        saved_status = NULL;
+                    }
 
                     // send away presence with last activity
                     char *message = prefs_get_string(PREF_AUTOAWAY_MESSAGE);