From 168bef440ddca0cbb28b4458e6be21a7db9a8a15 Mon Sep 17 00:00:00 2001 From: abv Date: Wed, 3 Jun 2015 10:01:40 +0300 Subject: [PATCH] 0026306: Access to deleted object in ShapeFix_FixSmallSolid Code corrected to avoid accessing element of sequence by reference after it is removed. --- src/ShapeFix/ShapeFix_FixSmallSolid.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ShapeFix/ShapeFix_FixSmallSolid.cxx b/src/ShapeFix/ShapeFix_FixSmallSolid.cxx index 64a3c01e52..70a82bcd42 100644 --- a/src/ShapeFix/ShapeFix_FixSmallSolid.cxx +++ b/src/ShapeFix/ShapeFix_FixSmallSolid.cxx @@ -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();