aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-chat.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-04-18 20:38:46 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-04-18 20:40:29 +0800
commit92ff1b9177bd6d8633b8d92357e5081db0e9554f (patch)
tree8f5a89e1694a7ee6be3508f8b1768e2ec9f8486e /libempathy-gtk/empathy-chat.c
parent2af2286eb763f631624db953679c1cba28ff91d7 (diff)
downloadgsoc2013-empathy-92ff1b9177bd6d8633b8d92357e5081db0e9554f.tar
gsoc2013-empathy-92ff1b9177bd6d8633b8d92357e5081db0e9554f.tar.gz
gsoc2013-empathy-92ff1b9177bd6d8633b8d92357e5081db0e9554f.tar.bz2
gsoc2013-empathy-92ff1b9177bd6d8633b8d92357e5081db0e9554f.tar.lz
gsoc2013-empathy-92ff1b9177bd6d8633b8d92357e5081db0e9554f.tar.xz
gsoc2013-empathy-92ff1b9177bd6d8633b8d92357e5081db0e9554f.tar.zst
gsoc2013-empathy-92ff1b9177bd6d8633b8d92357e5081db0e9554f.zip
chat_send_error_cb: don't display the message if it's NULL
Diffstat (limited to 'libempathy-gtk/empathy-chat.c')
-rw-r--r--libempathy-gtk/empathy-chat.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index b7c5192a8..2d906b0f4 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);
}