]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
[bos #29947] [CEA 29944] SIGSEGV using filet V9_9_BR V9_9_0 V9_9_0rc2
authorjfa <jfa@opencascade.com>
Thu, 19 May 2022 10:38:41 +0000 (13:38 +0300)
committervsr <vsr@opencascade.com>
Fri, 20 May 2022 13:25:33 +0000 (16:25 +0300)
src/ModuleBase/ModuleBase_WidgetSelector.cpp

index 6876a337fbd189abaf27279d04d8f4dbe6fcc997..65444345e7fb9ce2cbebee5ee1736707be17a81f 100644 (file)
@@ -73,7 +73,9 @@ void ModuleBase_WidgetSelector::getGeomSelection(const ModuleBase_ViewerPrsPtr&
   theShape = aSelection->getShape(thePrs);
 
   FeaturePtr aFeature = ModelAPI_Feature::feature(theObject);
-  while (aFeature && aFeature->lastResult()->groupName() == ModelAPI_ResultGroup::group()) {
+  while (aFeature.get() &&
+         aFeature->lastResult().get() &&
+         aFeature->lastResult()->groupName() == ModelAPI_ResultGroup::group()) {
     if (!getObjectFromGroup(theObject, theShape))
       break;
     aFeature = ModelAPI_Feature::feature(theObject);
@@ -297,4 +299,4 @@ bool getObjectFromGroup(ObjectPtr& theObject, GeomShapePtr& theShape)
     }
   }
   return false;
-}
\ No newline at end of file
+}