Cycles: Fix possible uninitialized XML read state which might cause crashes
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 30 Apr 2015 10:46:09 +0000 (15:46 +0500)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 30 Apr 2015 10:46:09 +0000 (15:46 +0500)
intern/cycles/app/cycles_xml.cpp

index 2b99dfe6febae957208065fe7dce1dc8e32651ef..382574696c42f9592cf7f03d8bc8f0700515a2c8 100644 (file)
@@ -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 */