summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--telepathy-glib/debug-sender.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/telepathy-glib/debug-sender.c b/telepathy-glib/debug-sender.c
index 6acd0152b..e3aee4ab7 100644
--- a/telepathy-glib/debug-sender.c
+++ b/telepathy-glib/debug-sender.c
@@ -383,7 +383,7 @@ _tp_debug_sender_take (TpDebugSender *self,
*
* Adds a new message to the debug sender message queue. If the
* #TpDebugSender:enabled property is set to %TRUE, then a NewDebugMessage
- * signal will be fired too.
+ * signal will be fired too. @string must be UTF-8 valid.
*
* Since: 0.7.36
*/
@@ -394,6 +394,10 @@ tp_debug_sender_add_message (TpDebugSender *self,
GLogLevelFlags level,
const gchar *string)
{
+ /* In the distant future we should probably fix this up ourselves
+ * for sending over D-Bus. fd.o#31857 */
+ g_return_if_fail (g_utf8_validate (string, -1, NULL));
+
_tp_debug_sender_take (self,
debug_message_new (timestamp, domain, level, string));
}