]> 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:13:17 +0000 (13:13 +0000)
committervsr <vsr@opencascade.com>
Fri, 31 Jul 2009 13:13:17 +0000 (13:13 +0000)
src/SMESHGUI/SMESHGUI_VTKUtils.cxx

index 00830c8d02e222788cb5275f00cc301a55e4cb5c..86bfdba72eb1c6360ca9975d2098d1cdc199093a 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();