Salome HOME
[bos #30176] [CEA][FORUM] 1D-Fillet segmentation fault
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Fillet1D.cpp
index e60d0f4b03393c404b3300ce7a1dd12d50d91952..24ba1854870e69377003dd7ff73c1c03f72230e5 100644 (file)
@@ -87,7 +87,9 @@ bool FeaturesPlugin_Fillet1D::baseShapes(ListOfShape& theWires, MapShapeSubs& th
     int aNbSel = aSelList->size();
     for (int ind = 0; ind < aNbSel; ++ind) {
       AttributeSelectionPtr aCurSel = aSelList->value(ind);
-      GeomShapePtr aWire = aCurSel->context()->shape();
+      GeomShapePtr aWire = aCurSel->value();
+      if (!aWire.get() && aCurSel->context().get())
+        aWire = aCurSel->context()->shape();
       if (aProcessedWires.find(aWire) != aProcessedWires.end())
         continue;
 
@@ -124,7 +126,6 @@ bool FeaturesPlugin_Fillet1D::baseShapes(ListOfShape& theWires, MapShapeSubs& th
         return false;
       }
 
-
       // keep the sequence of wires and fillet vertices stable
       theWires.push_back(aWire);
       for (GeomAPI_WireExplorer anExp(aWire->wire()); anExp.more(); anExp.next()) {