Salome HOME
Preselection using in operations: setSelection of widget returns a modified list...
[modules/shaper.git] / src / GeomValidators / GeomValidators_ConstructionComposite.cpp
index fea2319925f92521a50aac085a7f37678041971b..16fd4a2e954f83225f1c62adaf7f91774cc41a8b 100644 (file)
@@ -26,7 +26,14 @@ bool GeomValidators_ConstructionComposite::isValid(const AttributePtr& theAttrib
     // It is a GeomAPI_Vertex shape for the point. The shape of the parameter is 
     // GeomAPI_Shape. It is important to use the realization of the isEqual method from
     // GeomAPI_Vertex class
-    aValid = aShapePtr.get() != NULL && aShapePtr->isEqual(aShape);
+    if (aShape.get()) {
+      aValid = aShapePtr.get() != NULL && aShapePtr->isEqual(aShape);
+    }
+    else {
+      // an empty shape is used in attribute selection if the shape of the result is equal to
+      // the selected shape, so according to the upper condifition, the result is true
+      aValid = true;
+    }
   }
   if (!aValid) {
     ResultConstructionPtr aConstr =