[Bf-blender-cvs] [c92dc52] object_nodes: Fix for empty dupli list defaults, these must be neither NULL nor static.

Lukas Tönne noreply at git.blender.org
Wed Dec 23 18:34:44 CET 2015


Commit: c92dc52f341b04507f9352f50e76f8f6788ecf84
Author: Lukas Tönne
Date:   Wed Dec 23 18:34:13 2015 +0100
Branches: object_nodes
https://developer.blender.org/rBc92dc52f341b04507f9352f50e76f8f6788ecf84

Fix for empty dupli list defaults, these must be neither NULL nor static.

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

M	source/blender/blenvm/bvm/bvm_eval.cc

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

diff --git a/source/blender/blenvm/bvm/bvm_eval.cc b/source/blender/blenvm/bvm/bvm_eval.cc
index dc6500a..b56c756 100644
--- a/source/blender/blenvm/bvm/bvm_eval.cc
+++ b/source/blender/blenvm/bvm/bvm_eval.cc
@@ -145,8 +145,7 @@ static void eval_op_value_mesh(float *stack, StackIndex offset)
  */
 static void eval_op_value_duplis(float *stack, StackIndex offset)
 {
-	static DupliList duplis;
-	stack_store_duplis(stack, offset, &duplis);
+	stack_store_duplis(stack, offset, new DupliList());
 }
 
 static void eval_op_float_to_int(float *stack, StackIndex offset_from, StackIndex offset_to)
@@ -209,7 +208,7 @@ static void eval_op_release_mesh_ptr(float *stack, StackIndex offset)
 
 static void eval_op_init_duplis_ptr(float *stack, StackIndex offset, int use_count)
 {
-	duplis_ptr p(NULL);
+	duplis_ptr p(new DupliList());
 	p.set_use_count(use_count);
 	stack_store_duplis_ptr(stack, offset, p);
 }




More information about the Bf-blender-cvs mailing list