return NULL;
d = eina_hash_find(worker->hash, key);
- return d->data;
+ if (d)
+ return d->data;
+ return NULL;
#else
return NULL;
#endif
ecore_thread_local_data_del(Ecore_Thread *thread, const char *key)
{
Ecore_Pthread_Worker *worker = (Ecore_Pthread_Worker *) thread;
- Ecore_Thread_Data *d;
if ((!thread) || (!key))
return EINA_FALSE;
#ifdef EFL_HAVE_THREADS
if (!worker->hash)
return EINA_FALSE;
- if ((d = eina_hash_find(worker->hash, key)))
- _ecore_thread_data_free(d);
return eina_hash_del_by_key(worker->hash, key);
#else
return EINA_TRUE;
LRWKRL(_ecore_thread_global_hash_lock);
ret = eina_hash_find(_ecore_thread_global_hash, key);
LRWKU(_ecore_thread_global_hash_lock);
- return ret->data;
+ if (ret)
+ return ret->data;
+ return NULL;
#else
return NULL;
#endif
ecore_thread_global_data_del(const char *key)
{
Eina_Bool ret;
- Ecore_Thread_Data *d;
if (!key)
return EINA_FALSE;
return EINA_FALSE;
LRWKWL(_ecore_thread_global_hash_lock);
- if ((d = eina_hash_find(_ecore_thread_global_hash, key)))
- _ecore_thread_data_free(d);
ret = eina_hash_del_by_key(_ecore_thread_global_hash, key);
LRWKU(_ecore_thread_global_hash_lock);
return ret;