0026306: Access to deleted object in ShapeFix_FixSmallSolid
[occt.git] / src / ShapeFix / ShapeFix_FixSmallSolid.cxx
index 64a3c01..70a82bc 100644 (file)
@@ -455,8 +455,9 @@ TopoDS_Shape ShapeFix_FixSmallSolid::Merge (
 
         // remove the small solid
         theContext->Remove (aSmallSolid);
-        aSmallSolids.Remove (aSolidIter);
         SendWarning ( aSmallSolid, Message_Msg( "ShapeFix.FixSmallSolid.MSG1" ));
+
+        aSmallSolids.Remove (aSolidIter);
       }
       else
         aSolidIter.Next();