Salome HOME
Dump with geometrical selection
[modules/shaper.git] / src / Model / Model_ResultBody.cpp
index 7b7ae0780771916b7b1376d9dce9a845d221461d..c68a4ae4b54f2107f56759a0fa7c5bcfbc99ed29 100644 (file)
@@ -93,6 +93,8 @@ int Model_ResultBody::numberOfSubs(bool forTree) const
 
 ResultBodyPtr Model_ResultBody::subResult(const int theIndex, bool forTree) const
 {
+  if (theIndex >= int(mySubs.size()))
+    return ResultBodyPtr();
   return mySubs.at(theIndex);
 }