]> OCCT Git - occt.git/commitdiff
0029650: Data Exchange - possible exception in shape tool
authorika <ika@opencascade.com>
Tue, 27 Mar 2018 08:17:54 +0000 (11:17 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 29 Mar 2018 14:13:32 +0000 (17:13 +0300)
src/XCAFDoc/XCAFDoc_ShapeTool.cxx

index b39e3b0b5f8358bbb4787592f0e0c2aa51a88365..29edcfbdaea2a0273e3cfcb186d7171a537530b1 100644 (file)
@@ -1038,8 +1038,10 @@ Standard_Boolean XCAFDoc_ShapeTool::IsSubShape (const TDF_Label &shapeL,
   Handle(XCAFDoc_ShapeMapTool) A;
   if (!shapeL.FindAttribute(XCAFDoc_ShapeMapTool::GetID(), A))
   {
-    A = XCAFDoc_ShapeMapTool::Set(shapeL);
     TopoDS_Shape aShape = GetShape(shapeL);
+    if (aShape.IsNull())
+      return Standard_False;
+    A = XCAFDoc_ShapeMapTool::Set(shapeL);
     A->SetShape(aShape);
   }