Salome HOME
Updated copyright comment
[modules/shaper.git] / src / FiltersPlugin / FiltersPlugin_OnLine.cpp
index 29dc5b4611386ad41ec49b0a679bc26e20b4b2e8..99fc3e2e1d78b04b118bebc6cec284bfc833fe92 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -31,7 +31,10 @@ static void convertToLines(const AttributeSelectionListPtr& theSelected,
                            std::list<GeomLinePtr>& theLines)
 {
   for (int i = 0; i < theSelected->size(); i++) {
-    GeomShapePtr aCurShape = theSelected->value(i)->value();
+    AttributeSelectionPtr aSel = theSelected->value(i);
+    GeomShapePtr aCurShape = aSel->value();
+    if (!aCurShape)
+      aCurShape = aSel->context()->shape();
     if (aCurShape && aCurShape->isEdge()) {
       GeomLinePtr aLine = aCurShape->edge()->line();
       if (aLine)