From 3396e75d23cc634304b632464958eb1d1e1c2490 Mon Sep 17 00:00:00 2001 From: James Booth Date: Wed, 27 Jul 2016 23:35:49 +0100 Subject: [PATCH] Handle NULL saved_status --- src/xmpp/session.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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);