Commit af651d2e authored by Aashish Chaudhary's avatar Aashish Chaudhary
Browse files

BUG: Fixed the crash when user selected a non data array for edge weight.

parent f4f2f731
...@@ -226,6 +226,13 @@ int vtkBoostBetweennessClustering::RequestData( ...@@ -226,6 +226,13 @@ int vtkBoostBetweennessClustering::RequestData(
vtkDataArray* weights = vtkDataArray* weights =
input->GetEdgeData()->GetArray(this->EdgeWeightArrayName); input->GetEdgeData()->GetArray(this->EdgeWeightArrayName);
if(!weights)
{
vtkErrorMacro("Edge weight array " << this->EdgeWeightArrayName
<< " is not found or not a data array");
return 1;
}
edgeWeight.TakeReference( edgeWeight.TakeReference(
vtkDataArray::CreateDataArray(weights->GetDataType())); vtkDataArray::CreateDataArray(weights->GetDataType()));
......
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