[clutter/clutter-1.10] Check before using pango_layout_get_character_count()
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/clutter-1.10] Check before using pango_layout_get_character_count()
- Date: Wed, 11 Apr 2012 11:54:05 +0000 (UTC)
commit e2fa01ac9ae1c8f1805b000274f0b1bffa3ac484
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Wed Apr 11 12:47:01 2012 +0100
Check before using pango_layout_get_character_count()
Since it's in a debug code path, and 1.10 is the stable branch, we
should not bump the dependency of Pango to 1.30.
clutter/clutter-paint-nodes.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-paint-nodes.c b/clutter/clutter-paint-nodes.c
index e78199c..f0b6fd5 100644
--- a/clutter/clutter-paint-nodes.c
+++ b/clutter/clutter-paint-nodes.c
@@ -820,6 +820,7 @@ clutter_text_node_serialize (ClutterPaintNode *node)
json_builder_set_member_name (builder, "layout");
+#if PANGO_VERSION_CHECK (1, 30, 0)
if (pango_layout_get_character_count (tnode->layout) > 12)
{
const char *text = pango_layout_get_text (tnode->layout);
@@ -830,6 +831,7 @@ clutter_text_node_serialize (ClutterPaintNode *node)
g_free (str);
}
else
+#endif /* PANGO_VERSION_CHECK (1, 30, 0) */
json_builder_add_string_value (builder, pango_layout_get_text (tnode->layout));
json_builder_set_member_name (builder, "color");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]