evas: protect dead memory access.
authorCedric BAIL <cedric.bail@samsung.com>
Tue, 19 Feb 2013 10:16:58 +0000 (19:16 +0900)
committerCedric BAIL <cedric.bail@samsung.com>
Tue, 19 Feb 2013 10:16:58 +0000 (19:16 +0900)
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.

src/lib/evas/canvas/evas_name.c

index 5e2d92e..9693f0c 100644 (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;