From: vsr Date: Fri, 31 Jul 2009 13:13:17 +0000 (+0000) Subject: Issue 20443: SIGSEGV in SMESHGUI_VTKUtils.cxx::RemoveVisuData X-Git-Tag: V4_1_0_maintainance_FINAL~46 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=620fb19b42ac29a9d3862d421e6019ca8cfcc0f8;p=modules%2Fsmesh.git Issue 20443: SIGSEGV in SMESHGUI_VTKUtils.cxx::RemoveVisuData --- diff --git a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx index 00830c8d0..86bfdba72 100644 --- a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx @@ -192,7 +192,7 @@ namespace SMESH { vtkActorCollection *actors = aCopy.GetActors(); for (int i = 0; i < actors->GetNumberOfItems(); ++i ) { // size of actors changes inside the loop - while(SMESH_Actor *actor = dynamic_cast(actors->GetItemAsObject(i))) + if(SMESH_Actor *actor = dynamic_cast(actors->GetItemAsObject(i))) { vtkWnd->RemoveActor(actor); actor->Delete();