From d50a9642b009882b17345581c3bcbc74b93ced86 Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Mon, 6 Dec 2010 17:23:58 +0100 Subject: [PATCH] Set an error if there's no body so we can check it later https://bugs.freedesktop.org/show_bug.cgi?id=31121 --- telepathy-logger/log-store-xml.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/telepathy-logger/log-store-xml.c b/telepathy-logger/log-store-xml.c index d5f3744..865a1d7 100644 --- a/telepathy-logger/log-store-xml.c +++ b/telepathy-logger/log-store-xml.c @@ -462,7 +462,11 @@ add_message_text_chat (TplLogStoreXml *self, body_str = tpl_entry_text_get_message (message); if (TPL_STR_EMPTY (body_str)) - goto out; + { + g_set_error (error, TPL_LOG_STORE_ERROR, + TPL_LOG_STORE_ERROR_ADD_MESSAGE, "The message body is empty"); + goto out; + } body = g_markup_escape_text (body_str, -1); msg_type = _tpl_entry_text_get_message_type (message); -- 1.7.2.3