Evas textblock: Fixed a segfault with regular formats (ones without size explicitly set).

SVN revision: 56515
This commit is contained in:
Tom Hacohen 2011-01-30 10:42:56 +00:00
parent 80004f3d0b
commit 36261c8bd5
1 changed files with 11 additions and 5 deletions

View File

@ -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: