From: mpv Date: Wed, 30 Jul 2014 14:47:52 +0000 (+0400) Subject: Temporary workaround for crash fix (some unknown memory problem) X-Git-Tag: V_0.4.4~126 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e72ec8c7799926fd0ffe7cd2baf471a6026e1dad;p=modules%2Fshaper.git Temporary workaround for crash fix (some unknown memory problem) --- diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp index c5c8588d4..cba0974a5 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_SketchBuilder.cpp @@ -157,6 +157,8 @@ void GeomAlgoAPI_SketchBuilder::createFaces( gp_Dir aNextDir; while (aMapVE.Extent() > 0) { + if (aCurVertex.IsNull()) + return; findNextVertex(aCurVertex, aMapVE, aCurDir, aCurNorm, aNextVertex, aBindingEdge, aNextDir); aCurNorm = aNorm; @@ -210,7 +212,7 @@ void GeomAlgoAPI_SketchBuilder::createFaces( if (!aPatch.IsNull()) { boost::shared_ptr aFace(new GeomAPI_Shape); - aFace->setImpl(new TopoDS_Shape(aPatch)); + aFace->setImpl(new TopoDS_Face(aPatch)); theResultFaces.push_back(aFace); } // push the edges used in the loop to the map @@ -344,6 +346,8 @@ void GeomAlgoAPI_SketchBuilder::fixIntersections( for (++anIter2; anIter2 != theFaces.end(); anIter2++) { const TopoDS_Face& aF1 = (*anIter1)->impl(); + if (aF1.ShapeType() != TopAbs_FACE) // TODO: MPV - this workaround must be fixed later by AZV, now it just removes crash + continue; TopExp_Explorer aVert2((*anIter2)->impl(), TopAbs_VERTEX); for ( ; aVert2.More(); aVert2.Next()) {