Commit ba931533 authored by Sean McBride's avatar Sean McBride

Prevent null dereferences

Change-Id: I34437c615cddf42cae3f2f4e0431847679a0c251
parent 845c2495
......@@ -144,15 +144,15 @@ int vtkTemporalSnapToTimeStep::RequestData(
if (inData && outData)
{
outData->ShallowCopy(inData);
}
// fill in the time steps
double inTime = inData->GetInformation()->Get(vtkDataObject::DATA_TIME_STEP());
// fill in the time steps
double inTime = inData->GetInformation()->Get(vtkDataObject::DATA_TIME_STEP());
if(inData->GetInformation()->Has(vtkDataObject::DATA_TIME_STEP()))
{
double outTime = inTime;
outData->GetInformation()->Set(vtkDataObject::DATA_TIME_STEP(), outTime);
if(inData->GetInformation()->Has(vtkDataObject::DATA_TIME_STEP()))
{
double outTime = inTime;
outData->GetInformation()->Set(vtkDataObject::DATA_TIME_STEP(), outTime);
}
}
return 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment