From bac87b9e0688e20bf98f76392e0960a66be5a06b Mon Sep 17 00:00:00 2001 From: ChunEon Park Date: Fri, 17 Jun 2011 01:16:16 +0000 Subject: [PATCH] evas/evas_map - stuffed trivial missing things. SVN revision: 60415 --- legacy/evas/src/lib/canvas/evas_map.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/legacy/evas/src/lib/canvas/evas_map.c b/legacy/evas/src/lib/canvas/evas_map.c index e289f81..d322b92 100644 --- a/legacy/evas/src/lib/canvas/evas_map.c +++ b/legacy/evas/src/lib/canvas/evas_map.c @@ -166,6 +166,7 @@ _evas_map_free(Evas_Object *obj, Evas_Map *m) obj->layer->evas->engine.func->image_map_surface_free (obj->layer->evas->engine.data.output, m->surface); } + m->magic = 0; free(m); } @@ -364,6 +365,7 @@ evas_object_map_enable_set(Evas_Object *obj, Eina_Bool enabled) MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); + enabled = !!enabled; if (obj->cur.usemap == enabled) return; obj->cur.usemap = enabled; @@ -422,6 +424,7 @@ evas_object_map_set(Evas_Object *obj, const Evas_Map *map) MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return; MAGIC_CHECK_END(); + if (!map) { if (obj->cur.map) @@ -451,7 +454,7 @@ evas_object_map_set(Evas_Object *obj, const Evas_Map *map) return; } - if (obj->cur.map && obj->cur.map->count == map->count) + if ((obj->cur.map) && (obj->cur.map->count == map->count)) { Evas_Map *omap = obj->cur.map; obj->cur.map = _evas_map_new(map->count); @@ -476,8 +479,8 @@ evas_object_map_get(const Evas_Object *obj) MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ); return NULL; MAGIC_CHECK_END(); - if (obj->cur.map) return obj->cur.map; - return NULL; + + return obj->cur.map; } EAPI Evas_Map * @@ -488,6 +491,7 @@ evas_map_new(int count) ERR("map point count (%i) != 4 is unsupported!", count); return NULL; } + return _evas_map_new(count); } -- 2.7.4