]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
0022261: EDF 2698 SMESH: Memory leak when displaying 2D quadratic elements as arcs
authoreap <eap@opencascade.com>
Tue, 30 Jul 2013 13:06:46 +0000 (13:06 +0000)
committereap <eap@opencascade.com>
Tue, 30 Jul 2013 13:06:46 +0000 (13:06 +0000)
(SIGSEGV on a sphere)

Fix TransformGrid()

+  aTransformFilter->Update();

src/VTKViewer/VTKViewer_ArcBuilder.cxx

index dd87a91a31919ce991f4c81447787dc0b1ecb61e..af1ca44368ccf0052f991f191feaeadb50bd997b 100644 (file)
@@ -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;
 }