From 8c08401fcb9cbc9a775a6c2a9ebc3162746d3ee2 Mon Sep 17 00:00:00 2001 From: eap Date: Tue, 30 Jul 2013 13:06:46 +0000 Subject: [PATCH] 0022261: EDF 2698 SMESH: Memory leak when displaying 2D quadratic elements as arcs (SIGSEGV on a sphere) Fix TransformGrid() + aTransformFilter->Update(); --- src/VTKViewer/VTKViewer_ArcBuilder.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/VTKViewer/VTKViewer_ArcBuilder.cxx b/src/VTKViewer/VTKViewer_ArcBuilder.cxx index dd87a91a3..af1ca4436 100644 --- a/src/VTKViewer/VTKViewer_ArcBuilder.cxx +++ b/src/VTKViewer/VTKViewer_ArcBuilder.cxx @@ -396,9 +396,11 @@ VTKViewer_ArcBuilder::TransformGrid(vtkUnstructuredGrid* theGrid, aTransform->RotateWXYZ(angle, theAxis.GetXYZ().X(), theAxis.GetXYZ().Y(), theAxis.GetXYZ().Z()); vtkTransformFilter* aTransformFilter = vtkTransformFilter::New(); aTransformFilter->SetTransform(aTransform); - aTransformFilter->SetInputData(theGrid); aTransform->Delete(); - return aTransformFilter->GetUnstructuredGridOutput(); + aTransformFilter->SetInputData(theGrid); + aTransformFilter->Update(); + vtkUnstructuredGrid * aGrid = aTransformFilter->GetUnstructuredGridOutput(); + return aGrid; } -- 2.39.2