]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Issue 20443: SIGSEGV in SMESHGUI_VTKUtils.cxx::RemoveVisuData
authorvsr <vsr@opencascade.com>
Fri, 31 Jul 2009 13:12:15 +0000 (13:12 +0000)
committervsr <vsr@opencascade.com>
Fri, 31 Jul 2009 13:12:15 +0000 (13:12 +0000)
src/SMESHGUI/SMESHGUI_VTKUtils.cxx

index 0c564af0e21b92c7f657661343ebd9b6d12f1f26..569dc023bf68bbd9997b1a26e4158b66f8803046 100644 (file)
@@ -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<SMESH_Actor*>(actors->GetItemAsObject(i)))
+              if(SMESH_Actor *actor = dynamic_cast<SMESH_Actor*>(actors->GetItemAsObject(i)))
               {
                 vtkWnd->RemoveActor(actor);
                 actor->Delete();