forked from enlightenment/efl
efl/evas: use inheritance instead of strcmp and work around code running between destructor and free.
SVN revision: 83367
This commit is contained in:
parent
8589836860
commit
00f8823b95
|
@ -3252,9 +3252,12 @@ _destructor(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED)
|
|||
Evas_Object_Protected_Data *obj = eo_data_get(eo_obj, EVAS_OBJ_CLASS);
|
||||
Evas_Object_Image *o = _pd;
|
||||
|
||||
evas_object_image_video_surface_set(eo_obj, NULL);
|
||||
evas_object_image_free(eo_obj, obj);
|
||||
eina_cow_free(evas_object_image_load_opts_cow, o->load_opts);
|
||||
o->load_opts = &default_load_opts;
|
||||
eina_cow_free(evas_object_image_pixels_cow, o->pixels);
|
||||
o->pixels = &default_pixels;
|
||||
eo_do_super(eo_obj, eo_destructor());
|
||||
}
|
||||
|
||||
|
|
|
@ -137,7 +137,6 @@ evas_object_free(Evas_Object *eo_obj, int clean_layer)
|
|||
|
||||
int was_smart_child = 0;
|
||||
|
||||
if (!strcmp(obj->type, "image")) evas_object_image_video_surface_set(eo_obj, NULL);
|
||||
evas_object_map_set(eo_obj, NULL);
|
||||
if (obj->map->prev.map) evas_map_free(obj->map->prev.map);
|
||||
if (obj->map->cache_map) evas_map_free(obj->map->cache_map);
|
||||
|
|
Loading…
Reference in New Issue