Commit 33dde16e authored by Sean McBride's avatar Sean McBride

Fixed null deref and whitespace/indentation

Change-Id: I9d58e84125fc9626aeb426e063ff4f257a722c37
parent ba931533
......@@ -401,17 +401,19 @@ int vtkWeightedTransformFilter::RequestData(
this->CellDataTransformIndexArray[0] != '\0')
{
fd = pd;
if(fd != NULL) {
cdtiArray = reinterpret_cast<vtkUnsignedShortArray *>
(fd->GetArray(this->CellDataTransformIndexArray));
}
if(cdtiArray == NULL)
if(fd != NULL)
{
fd = input->GetFieldData();
if(fd != NULL) {
cdtiArray = reinterpret_cast<vtkUnsignedShortArray *>
(fd->GetArray(this->CellDataTransformIndexArray));
}
if(cdtiArray == NULL)
{
fd = input->GetFieldData();
if(fd != NULL)
{
cdtiArray = reinterpret_cast<vtkUnsignedShortArray *>
(fd->GetArray(this->CellDataTransformIndexArray));
}
}
if(cdtiArray == NULL)
{
......@@ -430,7 +432,7 @@ int vtkWeightedTransformFilter::RequestData(
"CellDataWeightArray " << this->WeightArray);
cdtiArray = NULL;
}
if (cdtiArray->GetDataType() != VTK_UNSIGNED_SHORT)
if (cdtiArray && (cdtiArray->GetDataType() != VTK_UNSIGNED_SHORT))
{
vtkWarningMacro(<<"CellDataTransformIndexArray " <<
this->CellDataTransformIndexArray <<
......
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