[Bf-blender-cvs] [16794f9] master: Cycles: Fix possible uninitialized XML read state which might cause crashes

Sergey Sharybin noreply at git.blender.org
Thu Apr 30 12:47:34 CEST 2015


Commit: 16794f908fe3f1df46096df100e007049991d89e
Author: Sergey Sharybin
Date:   Thu Apr 30 15:46:09 2015 +0500
Branches: master
https://developer.blender.org/rB16794f908fe3f1df46096df100e007049991d89e

Cycles: Fix possible uninitialized XML read state which might cause crashes

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

M	intern/cycles/app/cycles_xml.cpp

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

diff --git a/intern/cycles/app/cycles_xml.cpp b/intern/cycles/app/cycles_xml.cpp
index 2b99dfe..3825746 100644
--- a/intern/cycles/app/cycles_xml.cpp
+++ b/intern/cycles/app/cycles_xml.cpp
@@ -55,6 +55,16 @@ struct XMLReadState {
 	string base;		/* base path to current file*/
 	float dicing_rate;	/* current dicing rate */
 	Mesh::DisplacementMethod displacement_method;
+
+	XMLReadState()
+	  : scene(NULL),
+	    smooth(false),
+	    shader(0),
+	    dicing_rate(0.0f),
+	    displacement_method(Mesh::DISPLACE_BUMP)
+	{
+		tfm = transform_identity();
+	}
 };
 
 /* Attribute Reading */




More information about the Bf-blender-cvs mailing list