[Bf-blender-cvs] [f369b13] temp-ghash-experiments: Fix some stupid NULL free.

Bastien Montagne noreply at git.blender.org
Sat Feb 21 18:27:30 CET 2015


Commit: f369b1385382211d1b33862b4a24c38ca6936e80
Author: Bastien Montagne
Date:   Sat Feb 21 16:12:59 2015 +0100
Branches: temp-ghash-experiments
https://developer.blender.org/rBf369b1385382211d1b33862b4a24c38ca6936e80

Fix some stupid NULL free.

===================================================================

M	source/blender/blenlib/intern/BLI_ghash.c

===================================================================

diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c
index 4a2a234..02b2be0 100644
--- a/source/blender/blenlib/intern/BLI_ghash.c
+++ b/source/blender/blenlib/intern/BLI_ghash.c
@@ -181,7 +181,9 @@ BLI_INLINE void ghash_resize_buckets(GHash *gh, const unsigned int nbuckets)
 	}
 
 	gh->buckets = buckets_new;
-	MEM_freeN(buckets_old);
+	if (buckets_old) {
+		MEM_freeN(buckets_old);
+	}
 }
 
 //#include "PIL_time.h"




More information about the Bf-blender-cvs mailing list