{
m->move_sync.enabled = sync;
m->count = count;
- m->persp.foc = 0;
m->alpha = 1;
m->smooth = 1;
m->magic = MAGIC_MAP;
alloc = (count < 4) ? 4 : count;
if (alloc & 0x1) alloc ++;
- m = malloc(sizeof(Evas_Map) + (alloc * sizeof(Evas_Map_Point)));
+ m = calloc(1, sizeof(Evas_Map) + (alloc * sizeof(Evas_Map_Point)));
if (!m) return NULL;
_evas_map_init(m, count, sync);
return m;
void
_evas_map_reset(Evas_Map *m)
{
+ int alloc;
+
if (!m) return;
+
+ /* Adjust allocation such that: at least 4 points, and always an even
+ * number: this allows the software engine to work efficiently */
+ alloc = (m->count < 4) ? 4 : m->count;
+ if (alloc & 0x1) alloc ++;
+
+ memset(m, 0, sizeof(Evas_Map) + (alloc * sizeof(Evas_Map_Point)));
_evas_map_init(m, m->count, m->move_sync.enabled);
}