From: tasn Date: Sun, 30 Jan 2011 10:42:56 +0000 (+0000) Subject: Evas textblock: Fixed a segfault with regular formats (ones without size explicitly... X-Git-Tag: 2.0_alpha~240^2~1139 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a29724729bb229fce1cd19ce87b332ceb215915;p=framework%2Fuifw%2Fevas.git Evas textblock: Fixed a segfault with regular formats (ones without size explicitly set). git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@56515 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/src/lib/canvas/evas_object_textblock.c b/src/lib/canvas/evas_object_textblock.c index 8d15888..f69cfe5 100644 --- a/src/lib/canvas/evas_object_textblock.c +++ b/src/lib/canvas/evas_object_textblock.c @@ -2213,12 +2213,18 @@ _layout_line_finalize(Ctxt *c, Evas_Object_Textblock_Format *fmt) switch (fi->size) { case SIZE: - p = strstr(s, " size="); - p += 6; - if (sscanf(p, "%ix%i", &w, &h) == 2) + if (!strncmp(s, "item", 4)) { - w = w * c->obj->cur.scale; - h = h * c->obj->cur.scale; + p = strstr(s, " size="); + if (p) + { + p += 6; + if (sscanf(p, "%ix%i", &w, &h) == 2) + { + w = w * c->obj->cur.scale; + h = h * c->obj->cur.scale; + } + } } break; case SIZE_REL: