Salome HOME
registerNotObligatory is not necessary if this property is set in XML.
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetShapeSelector.cpp
index 27487c72a0c00eddbf73f7565bc328ea2d698e72..13f071c21dca6f64278fd3301edd222514030ec3 100644 (file)
@@ -212,7 +212,10 @@ GeomShapePtr ModuleBase_WidgetShapeSelector::getShape() const
   if (aType == ModelAPI_AttributeReference::typeId()) {
   } else if (aType == ModelAPI_AttributeRefAttr::typeId()) {
     AttributeRefAttrPtr aRefAttr = aData->refattr(attributeID());
-    aShape = myWorkshop->module()->findShape(aRefAttr);
+    if (aRefAttr.get() && !aRefAttr->isObject()) {
+      AttributePtr anAttribute = aRefAttr->attr();
+      aShape = myWorkshop->module()->findShape(anAttribute);
+    }
   } else if (aType == ModelAPI_AttributeSelection::typeId()) {
     AttributeSelectionPtr aSelectAttr = aData->selection(attributeID());
     aShape = aSelectAttr->value();