From 1ee66951f5cf501d139477fcff940306446520d3 Mon Sep 17 00:00:00 2001 From: Danielle Madeley Date: Mon, 7 Nov 2011 21:43:11 +1100 Subject: [PATCH] wocky-muc: return NULL if a timestamp can't be determined Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=42652 --- wocky/wocky-muc.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/wocky/wocky-muc.c b/wocky/wocky-muc.c index f23c72a..86a55cc 100644 --- a/wocky/wocky-muc.c +++ b/wocky/wocky-muc.c @@ -1333,9 +1333,6 @@ extract_timestamp (WockyNode *msg) } } - if (stamp == NULL) - stamp = g_date_time_new_from_unix_local (0); - return stamp; } @@ -1443,7 +1440,8 @@ handle_message (WockyPorter *porter, if (member_is_temporary) free_member (who); - g_date_time_unref (datetime); + if (datetime != NULL) + g_date_time_unref (datetime); return TRUE; } -- 1.7.5.4