evas: be consistent in our check for NULL layer.

Fix CID 1191913.
This commit is contained in:
Cedric BAIL 2014-03-13 10:46:05 +09:00
parent e9d86e8719
commit 9b0127f102
1 changed files with 2 additions and 1 deletions

View File

@ -14,7 +14,8 @@ _evas_object_name_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, const char *n
else
{
obj->name = strdup(name);
eina_hash_add(obj->layer->evas->name_hash, obj->name, eo_obj);
if (obj->layer && obj->layer->evas && obj->layer->evas->name_hash)
eina_hash_add(obj->layer->evas->name_hash, obj->name, eo_obj);
}
}