]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/GeomAPI/GeomAPI_AISObject.cpp
Salome HOME
Issue #800 Crash on call of pop-up menu of Part result
[modules/shaper.git] / src / GeomAPI / GeomAPI_AISObject.cpp
index fc34c50ae49953337cbd8279ae2a070a8b2eb488..10d720c835520e431bc0583e1e7e6215c5049639 100644 (file)
@@ -341,7 +341,9 @@ int GeomAPI_AISObject::getShapeType() const
   if (!anAIS.IsNull()) {
     Handle(AIS_Shape) aAISShape = Handle(AIS_Shape)::DownCast(anAIS);
     if (!aAISShape.IsNull()) {
-      return aAISShape->Shape().ShapeType();
+      const TopoDS_Shape aShape = aAISShape->Shape();
+      if (!aShape.IsNull())
+        return aShape.ShapeType();
     }
   }
   return -1;