From 47b7c0f36b26a16a5c4a069d58cf419e115a644c Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Thu, 25 Oct 2012 11:28:12 +0000 Subject: [PATCH] fix minor case of the segv's in evas. SVN revision: 78443 --- legacy/evas/src/lib/canvas/evas_object_textblock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/legacy/evas/src/lib/canvas/evas_object_textblock.c b/legacy/evas/src/lib/canvas/evas_object_textblock.c index 55b29afded..cccad0af22 100644 --- a/legacy/evas/src/lib/canvas/evas_object_textblock.c +++ b/legacy/evas/src/lib/canvas/evas_object_textblock.c @@ -1531,6 +1531,7 @@ _format_command(Evas_Object *eo_obj, Evas_Object_Textblock_Format *fmt, const ch if (*p2) { + fprintf(stderr, "FMT: '%s' '%s'\n", p1, p2); if (!strcmp(p2, "bottom_right")) EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_RIGHT); else if (!strcmp(p2, "bottom")) EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM); else if (!strcmp(p2, "bottom_left")) EVAS_TEXT_STYLE_SHADOW_DIRECTION_SET(fmt->style, EVAS_TEXT_STYLE_SHADOW_DIRECTION_BOTTOM_LEFT); @@ -1796,7 +1797,7 @@ _format_dup(Evas_Object *eo_obj, const Evas_Object_Textblock_Format *fmt) fmt2 = calloc(1, sizeof(Evas_Object_Textblock_Format)); memcpy(fmt2, fmt, sizeof(Evas_Object_Textblock_Format)); fmt2->ref = 1; - fmt2->font.fdesc = evas_font_desc_ref(fmt->font.fdesc); + if (fmt->font.fdesc) fmt2->font.fdesc = evas_font_desc_ref(fmt->font.fdesc); if (fmt->font.source) fmt2->font.source = eina_stringshare_add(fmt->font.source);