Commit 43d4a38b authored by Chris Harris's avatar Chris Harris
Browse files

Fix assert in vtkRAdapter

907df317 introduced a bug that would allow
nodeWeights->GetValue(...) to be called if parent is
-1, move this code into the protected if block.

Change-Id: I9838f59dbb8b571f75ac9eb38f33114f4de45eaf
parent 7c96a9d0
......@@ -779,8 +779,8 @@ vtkTree* vtkRAdapter::RToVTKTree(SEXP variable)
if (parent >= 0)
{
weight = weights->GetValue(tree->GetEdgeId(parent, vertex));
weight += nodeWeights->GetValue(parent);
}
weight += nodeWeights->GetValue(parent);
nodeWeights->SetValue(vertex, weight);
}
......
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