From: dbv Date: Wed, 18 Nov 2015 06:49:22 +0000 (+0300) Subject: Fix for crash in fillet X-Git-Tag: V_2.0.0~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5bf045a27ece00b52f827ab8b942f817ec1077f1;p=modules%2Fshaper.git Fix for crash in fillet --- diff --git a/src/Events/Events_Loop.cpp b/src/Events/Events_Loop.cpp index da0d87862..d2d96de53 100644 --- a/src/Events/Events_Loop.cpp +++ b/src/Events/Events_Loop.cpp @@ -129,7 +129,10 @@ void Events_Loop::flush(const Events_ID& theID) send(aGroup, false); if (!aWasFlushed) - myFlushed.erase(myFlushed.find(theID.myID)); + // TODO: Stabilization fix. Check later. + if(myFlushed.find(theID.myID) != myFlushed.end()) { + myFlushed.erase(myFlushed.find(theID.myID)); + } } } diff --git a/src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp b/src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp index d723a3e20..bf47039b1 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintFillet.cpp @@ -226,6 +226,10 @@ void SketchPlugin_ConstraintFillet::execute() // Calculate fillet arc parameters std::shared_ptr aCenter, aTangentPntA, aTangentPntB; calculateFilletCenter(anOldFeatureA, anOldFeatureB, aFilletRadius, isStart, aCenter, aTangentPntA, aTangentPntB); + if(!aCenter.get() || !aTangentPntA.get() || !aTangentPntB.get()) { + setError("Can not create fillet with the specified parameters."); + return; + } // update features std::dynamic_pointer_cast( aNewFeatureA->attribute(aFeatAttributes[isStart[0] ? 0 : 1]))->setValue(