Salome HOME
Merge branch 'V9_5_BR'
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IShapesOperations.cxx
index 75b41d6e77cf20fcefaaefa4206101304b3e444d..12b7f46924e6a38c045eab0e40e1321325ecd534 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -2036,10 +2036,12 @@ Standard_Boolean GEOMImpl_IShapesOperations::IsSubShapeBelongsTo( Handle(GEOM_Ob
   if ( theObjectIndex > 0 ) {
     TopExp::MapShapes( shape, anIndices );
     shape = anIndices.FindKey(theObjectIndex);
+    anIndices.Clear();
   }
   if ( theSubObjectIndex > 0 ) {
     TopExp::MapShapes( subShape, anIndices );
     subShape = anIndices.FindKey(theSubObjectIndex);
+    anIndices.Clear();
   }
 
   TopExp::MapShapes( shape, anIndices );