Salome HOME
Avoid crash if there is no parent of selection attribute.
[modules/shaper.git] / src / GeomAPI / GeomAPI_PlanarEdges.cpp
index fa4686de7e8797971b1d0ffc20520d9fdad9c978..dbc6e498a943ce533a23e5010d39558a3fcd3a19 100644 (file)
@@ -122,6 +122,8 @@ bool GeomAPI_PlanarEdges::isEqual(const std::shared_ptr<GeomAPI_Shape> theShape)
     return false;
   TopoDS_Shape& aMyShape = const_cast<TopoDS_Shape&>(impl<TopoDS_Shape>());
   TopoDS_Shape aTheShape = theShape->impl<TopoDS_Shape>();
+  if (aMyShape.ShapeType() != aTheShape.ShapeType()) // to don't confuse by the face of same edges
+    return false;
   TopExp_Explorer aMyExp(aMyShape, TopAbs_EDGE);
   TopExp_Explorer aTheExp(aTheShape, TopAbs_EDGE);
   for (; aMyExp.More() && aTheExp.More(); aMyExp.Next(), aTheExp.Next()) {