diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2014-05-15 21:23:51 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2014-05-15 21:23:51 +0900 |
commit | ddc09dd04ec56facc494760a381dc5a429d8c699 (patch) | |
tree | 62e0f404cb8b11c629fa08e7ea078bfe1de63874 | |
parent | c3f0a0c59d9d73ce4861ed771c5ded1eadab4f50 (diff) | |
download | efl-ddc09dd04ec56facc494760a381dc5a429d8c699.tar.gz |
fix ecore_thread_global_data_wait to work when no data exists yet
@fix
this is based on feedback from wonil choi, where this didn't work
right. this also has an if check for the hash itself.
-rw-r--r-- | src/lib/ecore/ecore_thread.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/ecore/ecore_thread.c b/src/lib/ecore/ecore_thread.c index fed5b3353b..a3202f6585 100644 --- a/src/lib/ecore/ecore_thread.c +++ b/src/lib/ecore/ecore_thread.c @@ -1311,15 +1311,14 @@ ecore_thread_global_data_wait(const char *key, if (!key) return NULL; - if (!_ecore_thread_global_hash) - return NULL; if (seconds > 0) tm = ecore_time_get() + seconds; while (1) { LRWKRL(_ecore_thread_global_hash_lock); - ret = eina_hash_find(_ecore_thread_global_hash, key); + if (_ecore_thread_global_hash) + ret = eina_hash_find(_ecore_thread_global_hash, key); LRWKU(_ecore_thread_global_hash_lock); if ((ret) || (!seconds) || ((seconds > 0) && (tm <= ecore_time_get()))) break; |