Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-07-20 04:15:01 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-20 04:15:01 +0400
commit4b0f50597f9c625b55e97c579db7b4159dc22372 (patch)
tree4d31bfe099677b49eaed6068d456821dbaee085f
parentac1d58d962084df88a699eec6abe267444295fd6 (diff)
revert r58419. caller should do NULL check here.
-rw-r--r--source/blender/blenlib/intern/BLI_ghash.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c
index 5b9045b1ba2..d30d3f3d256 100644
--- a/source/blender/blenlib/intern/BLI_ghash.c
+++ b/source/blender/blenlib/intern/BLI_ghash.c
@@ -116,14 +116,9 @@ void BLI_ghash_insert(GHash *gh, void *key, void *val)
void *BLI_ghash_lookup(GHash *gh, const void *key)
{
-
- unsigned int hash;
+ const unsigned int hash = gh->hashfp(key) % gh->nbuckets;
Entry *e;
- if (!gh) return NULL;
-
- hash = gh->hashfp(key) % gh->nbuckets;
-
for (e = gh->buckets[hash]; e; e = e->next) {
if (gh->cmpfp(key, e->key) == 0) {
return e->val;