Commit 4c2f6570 authored by Ken Martin's avatar Ken Martin

fix memory leax in vtkPlotParallelCoordinates

There was a spot where an ivar could be
set without checking if it already had a value that
needed to be released.
parent 6647266f
......@@ -391,6 +391,11 @@ bool vtkPlotParallelCoordinates::UpdateTableCache(vtkTable *table)
vtkDataArray* c =
vtkArrayDownCast<vtkDataArray>(table->GetColumnByName(this->ColorArrayName));
// TODO: Should add support for categorical coloring & try enum lookup
if (this->Colors)
{
this->Colors->UnRegister(this);
this->Colors = 0;
}
if (c)
{
if (!this->LookupTable)
......@@ -402,11 +407,6 @@ bool vtkPlotParallelCoordinates::UpdateTableCache(vtkTable *table)
this->Colors->Register(this);
this->Colors->Delete();
}
else
{
this->Colors->UnRegister(this);
this->Colors = 0;
}
}
this->BuildTime.Modified();
......
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