Salome HOME
updated copyright message
[modules/shaper.git] / src / FiltersPlugin / FiltersPlugin_BelongsTo.cpp
index 9c7010b2d1204cb245e93ddefb45299d9114ebe4..244c9233224c0ddc8ed816ad1ddc01d15eb58d9d 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -21,7 +21,7 @@
 
 #include <ModelAPI_AttributeSelectionList.h>
 
-bool FiltersPlugin_BelongsTo::isSupported(GeomAPI_Shape::ShapeType theType) const
+bool FiltersPlugin_BelongsTo::isSupported(GeomAPI_Shape::ShapeType /*theType*/) const
 {
   return true;
 }
@@ -35,9 +35,9 @@ bool FiltersPlugin_BelongsTo::isOk(const GeomShapePtr& theShape, const ResultPtr
   if (!aList.get())
     return false;
   for (int i = 0; i < aList->size(); i++) {
-    AttributeSelectionPtr aAttr = aList->value(i);
-    GeomShapePtr aGeom = aAttr->value();
-    if (aGeom->isSubShape(theShape))
+    AttributeSelectionPtr aCurAttr = aList->value(i);
+    GeomShapePtr aGeom = aCurAttr->value();
+    if (aGeom && aGeom->isSubShape(theShape))
       return true;
   }
   return false;