]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for crash on changing of creation modes or already created arc
authormpv <mpv@opencascade.com>
Thu, 23 Jun 2016 16:36:39 +0000 (19:36 +0300)
committermpv <mpv@opencascade.com>
Thu, 23 Jun 2016 16:36:39 +0000 (19:36 +0300)
src/ModelAPI/ModelAPI_Tools.cpp

index 8d0b8f01829463233bca856e132203c01719e541..7a7bbecb7f9ada529aadb71326638d8593217f46 100755 (executable)
@@ -359,6 +359,8 @@ bool hasSubResults(const ResultPtr& theResult)
 
 void allResults(const FeaturePtr& theFeature, std::list<ResultPtr>& theResults)
 {
+  if (!theFeature.get()) // safety: for empty feature no results
+    return;
   const std::list<std::shared_ptr<ModelAPI_Result> >& aResults = theFeature->results();
   std::list<std::shared_ptr<ModelAPI_Result> >::const_iterator aRIter = aResults.begin();
   for (; aRIter != aResults.cend(); aRIter++) {