Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-05-06 22:18:58 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-05-06 22:19:53 +0400
commitf300c158b92452d00c08ebcd0eb08ac23d28c69e (patch)
treee50caf225c88341284fd3e973ce20ccd8418033f /intern/cycles/render/object.cpp
parent6dbe732a2f4e112e763fd2e71516a726da00e40f (diff)
Fix possible NULL pointer dereference in Cycles
Diffstat (limited to 'intern/cycles/render/object.cpp')
-rw-r--r--intern/cycles/render/object.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp
index 750fae98662..e2d6ae6fa18 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;