From 2afe66e1b1003d070a23f40ba96a75c83e87c506 Mon Sep 17 00:00:00 2001 From: barbieri Date: Fri, 12 Dec 2008 22:34:20 +0000 Subject: [PATCH] Bugfix: do not search/delete in non-existent hashes. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@38119 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/ecore_evas/ecore_evas.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c index 721cccc..3e92c1d 100644 --- a/src/lib/ecore_evas/ecore_evas.c +++ b/src/lib/ecore_evas/ecore_evas.c @@ -686,6 +686,7 @@ ecore_evas_data_get(const Ecore_Evas *ee, const char *key) } if (!key) return NULL; + if (!ee->data) return NULL; return eina_hash_find(ee->data, key); } @@ -717,7 +718,8 @@ ecore_evas_data_set(Ecore_Evas *ee, const char *key, const void *data) if (!key) return; - eina_hash_del(ee->data, key, NULL); + if (ee->data) + eina_hash_del(ee->data, key, NULL); if (data) { if (!ee->data) -- 2.7.4