[empathy: 7/19] chat_send_error_cb: don't display the message if it's NULL
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy: 7/19] chat_send_error_cb: don't display the message if it's NULL
- Date: Wed, 20 Apr 2011 07:50:43 +0000 (UTC)
commit 92ff1b9177bd6d8633b8d92357e5081db0e9554f
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Mon Apr 18 14:38:46 2011 +0200
chat_send_error_cb: don't display the message if it's NULL
libempathy-gtk/empathy-chat.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index b7c5192..2d906b0 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1295,9 +1295,14 @@ chat_send_error_cb (EmpathyTpChat *tp_chat,
break;
}
- str = g_strdup_printf (_("Error sending message '%s': %s"),
- message_body,
- error);
+ if (message_body != NULL) {
+ str = g_strdup_printf (_("Error sending message '%s': %s"),
+ message_body, error);
+ }
+ else {
+ str = g_strdup_printf (_("Error sending message: %s"), error);
+ }
+
empathy_chat_view_append_event (chat->view, str);
g_free (str);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]