From 320a322080557df3cb644c73b00ba2f45ecccf92 Mon Sep 17 00:00:00 2001 From: gka Date: Wed, 26 Oct 2016 19:31:49 +0300 Subject: [PATCH] 0026524: ShapeFix_Face crash when performing fix on an invalid face. Check that method Context() returns not null handle was added. --- src/ShapeFix/ShapeFix_Face.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ShapeFix/ShapeFix_Face.cxx b/src/ShapeFix/ShapeFix_Face.cxx index b5bc649e17..9ebadf5504 100644 --- a/src/ShapeFix/ShapeFix_Face.cxx +++ b/src/ShapeFix/ShapeFix_Face.cxx @@ -2459,7 +2459,12 @@ Standard_Boolean ShapeFix_Face::FixSplitFace(const TopTools_DataMapOfShapeListOf for(Standard_Integer i=1; i<=faces.Length(); i++ ) B.Add(Comp,faces(i)); myResult = Comp; - Context()->Replace ( myFace, myResult ); + + if(!Context().IsNull()) + { + Context()->Replace ( myFace, myResult ); + } + for (TopExp_Explorer exp ( myResult, TopAbs_FACE ); exp.More(); exp.Next() ) { myFace = TopoDS::Face ( exp.Current() ); BRepTools::Update(myFace);