From 09c04d4c67ea8d3ebeb3ee5adfc3752562cae3cc Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 9 Nov 2009 11:07:27 +0000 Subject: [PATCH] text: Add a NULL preedit string check This commit avoids a critical warning introduced by commit bc51b8ca47ac90e52ab6a27ff791ea97d53f4648 --- clutter/clutter-text.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clutter/clutter-text.c b/clutter/clutter-text.c index c95a4cf..04f24d5 100644 --- a/clutter/clutter-text.c +++ b/clutter/clutter-text.c @@ -594,7 +594,9 @@ clutter_text_position_to_coords (ClutterText *self, gint cursor_index; cursor_index = offset_to_bytes (text, priv->position); - g_string_insert (tmp, cursor_index, priv->preedit_str); + + if (priv->preedit_str != NULL) + g_string_insert (tmp, cursor_index, priv->preedit_str); if (priv->password_char == 0) index_ = offset_to_bytes (tmp->str, position); -- 2.7.4