Skip to content
Snippets Groups Projects
Commit 5eccfa3f authored by David Gobbi's avatar David Gobbi
Browse files

BUG 13312: Fix crash on vtkImageProperty DeepCopy with LUT.

If DeepCopy was used to copy a vtkImageProperty with a LookupTable into
a vtkImageProperty without a LookupTable, a segmentation fault occurred.

Backport of 316062ca from master to release.

Change-Id: I1039fd8c9109b9005ae9038b0404c103c141079a
parent 9e66eb8f
Branches
No related tags found
No related merge requests found
......@@ -91,9 +91,8 @@ void vtkImageProperty::DeepCopy(vtkImageProperty *p)
}
else
{
vtkScalarsToColors *olut = this->GetLookupTable();
vtkScalarsToColors *nlut = olut->NewInstance();
nlut->DeepCopy(olut);
vtkScalarsToColors *nlut = lut->NewInstance();
nlut->DeepCopy(lut);
this->SetLookupTable(nlut);
nlut->Delete();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment