evas: protect dead memory access.

Since the move to Eo, we no do unref objects after destroying the name
hash. So we need to take that into account when looking at the hash.
This commit is contained in:
Cedric BAIL 2013-02-19 19:16:58 +09:00
parent cffb139ce1
commit e756a4115b
1 changed files with 2 additions and 1 deletions

View File

@ -18,7 +18,8 @@ _name_set(Eo *eo_obj, void *_pd, va_list *list)
Evas_Object_Protected_Data *obj = _pd;
if (obj->name)
{
eina_hash_del(obj->layer->evas->name_hash, obj->name, eo_obj);
if (obj->layer && obj->layer->evas && obj->layer->evas->name_hash)
eina_hash_del(obj->layer->evas->name_hash, obj->name, eo_obj);
free(obj->name);
}
if (!name) obj->name = NULL;