evas: catch bad map early on.

SVN revision: 73416
This commit is contained in:
Cedric BAIL 2012-07-06 14:03:38 +00:00
parent 3cc270844b
commit 401d68ada6
3 changed files with 7 additions and 4 deletions

View File

@ -868,3 +868,8 @@
2012-07-05 Cedric Bail 2012-07-05 Cedric Bail
* Strongly disable Evas pipe rendering. * Strongly disable Evas pipe rendering.
2012-07-05 Cedric Bail
* Don't let bad map sneek at render time and ban them as early as possible.

View File

@ -20,6 +20,7 @@ Improvements:
Fixes: Fixes:
* Add missing files in the tarball. * Add missing files in the tarball.
* Add svg rendering with Esvg * Add svg rendering with Esvg
* Don't accept broken map.
Removal: Removal:
* Remove EVAS_FRAME_QUEUING, EVAS_SLI, METRIC_CACHE and WORD_CACHE. * Remove EVAS_FRAME_QUEUING, EVAS_SLI, METRIC_CACHE and WORD_CACHE.

View File

@ -453,7 +453,7 @@ evas_object_map_set(Evas_Object *obj, const Evas_Map *map)
return; return;
MAGIC_CHECK_END(); MAGIC_CHECK_END();
if (!map) if (!map || map->count < 4)
{ {
if (obj->cur.map) if (obj->cur.map)
{ {
@ -1059,9 +1059,6 @@ evas_object_map_update(Evas_Object *obj,
obj->spans = NULL; obj->spans = NULL;
} }
if (!((obj->cur.map) && (obj->cur.map->count > 3) && (obj->cur.usemap)))
return ;
if (!obj->spans) if (!obj->spans)
obj->spans = calloc(1, sizeof (RGBA_Map) + obj->spans = calloc(1, sizeof (RGBA_Map) +
sizeof (RGBA_Map_Point) * (obj->cur.map->count - 1)); sizeof (RGBA_Map_Point) * (obj->cur.map->count - 1));