Skip to content
Snippets Groups Projects
Commit 9f2759cf authored by Ken Martin's avatar Ken Martin Committed by David E. DeMarle
Browse files

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 50f31694
No related branches found
Tags v7.1.0.rc2
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment