]> git.0d.be Git - empathy.git/commitdiff
chat_send_error_cb: don't display the message if it's NULL
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 18 Apr 2011 12:38:46 +0000 (14:38 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 18 Apr 2011 12:40:29 +0000 (14:40 +0200)
libempathy-gtk/empathy-chat.c

index b7c5192a8bfd14a02ac36ceb2c1aa91297c741ca..2d906b0f4d5b93a3e21604faf232ee4c5cc32c8c 100644 (file)
@@ -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);
 }