#include <SVTK_ViewWindow.h>
+#include <VTKViewer_Algorithm.h>
+
// SALOME KERNEL includes
#include <SALOMEDSClient_Study.hxx>
// iterate on all actors in current view window, search for
// any visible actor, that belongs to group or submesh of current mesh
- vtkActorCollection *aCollection = aViewWindow->getRenderer()->GetActors();
+ VTK::ActorCollectionCopy aCopy(aViewWindow->getRenderer()->GetActors());
+ vtkActorCollection *aCollection = aCopy.GetActors();
int nbItems = aCollection->GetNumberOfItems();
for (int i=0; i<nbItems && !isActor; i++)
{