From f7a426587c7e2e5bfce5f0e72cc65d8f9ee4bdf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Fri, 28 Sep 2007 10:54:42 +0000 Subject: [PATCH] * clutter/clutter-label.c: (clutter_label_ensure_layout): avoid calling pango_layout_set_text|markup before we've got any text. --- ChangeLog | 5 +++++ clutter/clutter-label.c | 13 ++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index c53869159..665e12b39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-09-28 Øyvind Kolås + + * clutter/clutter-label.c: (clutter_label_ensure_layout): avoid + calling pango_layout_set_text|markup before we've got any text. + 2007-09-27 Matthew Allum * tests/test-scale.c: diff --git a/clutter/clutter-label.c b/clutter/clutter-label.c index d56870af2..c49b136ae 100644 --- a/clutter/clutter-label.c +++ b/clutter/clutter-label.c @@ -224,11 +224,14 @@ clutter_label_ensure_layout (ClutterLabel *label, priv->single_line_mode); pango_layout_set_font_description (priv->layout, priv->desc); - - if (!priv->use_markup) - pango_layout_set_text (priv->layout, priv->text, -1); - else - pango_layout_set_markup (priv->layout, priv->text, -1); + + if (priv->text) + { + if (!priv->use_markup) + pango_layout_set_text (priv->layout, priv->text, -1); + else + pango_layout_set_markup (priv->layout, priv->text, -1); + } if (priv->wrap) pango_layout_set_wrap (priv->layout, priv->wrap_mode);