aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
}