forked from bartvdbraak/blender
Fix possible NULL pointer dereference in Cycles
This commit is contained in:
parent
6dbe732a2f
commit
f300c158b9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user