[Bf-blender-cvs] [f300c15] master: Fix possible NULL pointer dereference in Cycles
Campbell Barton
noreply at git.blender.org
Tue May 6 20:20:21 CEST 2014
Commit: f300c158b92452d00c08ebcd0eb08ac23d28c69e
Author: Campbell Barton
Date: Wed May 7 04:18:58 2014 +1000
https://developer.blender.org/rBf300c158b92452d00c08ebcd0eb08ac23d28c69e
Fix possible NULL pointer dereference in Cycles
===================================================================
M intern/cycles/render/object.cpp
===================================================================
diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp
index 750fae9..e2d6ae6 100644
--- a/intern/cycles/render/object.cpp
+++ b/intern/cycles/render/object.cpp
@@ -189,11 +189,12 @@ vector<float> Object::motion_times()
{
/* compute times at which we sample motion for this object */
vector<float> times;
- int motion_steps = mesh->motion_steps;
- if(!mesh || motion_steps == 1)
+ if(!mesh || mesh->motion_steps == 1)
return times;
+ int motion_steps = mesh->motion_steps;
+
for(int step = 0; step < motion_steps; step++) {
if(step != motion_steps / 2) {
float time = 2.0f * step / (motion_steps - 1) - 1.0f;
More information about the Bf-blender-cvs
mailing list