forked from enlightenment/efl
ooh map bug! bug bug bug! fix! (thanks valgrind)
SVN revision: 55826
This commit is contained in:
parent
ea55cf1bf6
commit
f9277782e7
|
@ -42,28 +42,29 @@ _evas_map_calc_map_geometry(Evas_Object *obj)
|
|||
if (!obj->cur.map) return;
|
||||
if (obj->prev.map)
|
||||
{
|
||||
if (obj->prev.map->count == obj->cur.map->count)
|
||||
{
|
||||
const Evas_Map_Point *p2;
|
||||
|
||||
p = obj->cur.map->points;
|
||||
p_end = p + obj->cur.map->count;
|
||||
p2 = obj->prev.map->points;
|
||||
|
||||
for (; p < p_end; p++, p2++)
|
||||
if (p->a != p2->a ||
|
||||
p->r != p2->r ||
|
||||
p->g != p2->g ||
|
||||
p->b != p2->b)
|
||||
{
|
||||
ch = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ch = 1;
|
||||
}
|
||||
// FIXME: this causes an infinite loop somewhere... hard to debug
|
||||
if (obj->prev.map->count == obj->cur.map->count)
|
||||
{
|
||||
const Evas_Map_Point *p2;
|
||||
|
||||
p = obj->cur.map->points;
|
||||
p_end = p + obj->cur.map->count;
|
||||
p2 = obj->prev.map->points;
|
||||
|
||||
for (; p < p_end; p++, p2++)
|
||||
{
|
||||
if ((p->a != p2->a) ||
|
||||
(p->r != p2->r) ||
|
||||
(p->g != p2->g) ||
|
||||
(p->b != p2->b))
|
||||
{
|
||||
ch = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
ch = 1;
|
||||
}
|
||||
|
||||
p = obj->cur.map->points;
|
||||
|
@ -482,6 +483,7 @@ evas_object_map_set(Evas_Object *obj, const Evas_Map *map)
|
|||
obj->cur.map = _evas_map_new(4);
|
||||
memcpy(obj->cur.map, omap, sizeof(Evas_Map) + (4 * sizeof(Evas_Map_Point)));
|
||||
_evas_map_copy(obj->cur.map, map);
|
||||
if (obj->prev.map == omap) obj->prev.map = NULL;
|
||||
free(omap);
|
||||
}
|
||||
_evas_map_calc_map_geometry(obj);
|
||||
|
|
Loading…
Reference in New Issue