Commit 666d78c2 authored by Sean McBride's avatar Sean McBride

Advance null check to before cast

Otherwise, clang analyzer thought dfunc could be nil

Change-Id: I443c31efbe38a300173ba75c739d4ab8d350abef
parent 8092d86d
......@@ -653,14 +653,14 @@ void vtkKMeansStatistics::Assess( vtkTable* inData,
reqModel,
0,
dfunc );
vtkKMeansAssessFunctor* kmfunc = static_cast<vtkKMeansAssessFunctor*>( dfunc );
if ( ! kmfunc )
if ( ! dfunc )
{
vtkWarningMacro( "Assessment could not be accommodated. Skipping." );
delete dfunc;
return;
}
vtkKMeansAssessFunctor* kmfunc = static_cast<vtkKMeansAssessFunctor*>( dfunc );
vtkIdType nv = this->AssessNames->GetNumberOfValues();
int numRuns = kmfunc->GetNumberOfRuns();
vtkStdString* names = new vtkStdString[nv*numRuns];
......
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