[Bf-blender-cvs] [ae0ed5e] master: RNA: Don't fill in color grid array when built without smoke

Sergey Sharybin noreply at git.blender.org
Fri Jun 19 13:57:18 CEST 2015


Commit: ae0ed5e9d57f1e74cdc689307c090f0875c07e45
Author: Sergey Sharybin
Date:   Fri Jun 19 13:55:31 2015 +0200
Branches: master
https://developer.blender.org/rBae0ed5e9d57f1e74cdc689307c090f0875c07e45

RNA: Don't fill in color grid array when built without smoke

Array length is set to 0 in that case, so filling in first element is
likely to cause memory corruptions.

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

M	source/blender/makesrna/intern/rna_smoke.c

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

diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index 03fca13..ba1cf2f 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -264,7 +264,6 @@ static void rna_SmokeModifier_color_grid_get(PointerRNA *ptr, float *values)
 	BLI_rw_mutex_unlock(sds->fluid_mutex);
 #else
 	(void)ptr;
-	memset(values, 0, 4 * sizeof(float));
 #endif
 }




More information about the Bf-blender-cvs mailing list