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"

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to