From: ika Date: Tue, 27 Mar 2018 08:17:54 +0000 (+0300) Subject: 0029650: Data Exchange - possible exception in shape tool X-Git-Tag: V7_3_0_beta~22 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=a38b44f172bbf888b4f47422fc60119d5f20e041;p=occt.git 0029650: Data Exchange - possible exception in shape tool --- diff --git a/src/XCAFDoc/XCAFDoc_ShapeTool.cxx b/src/XCAFDoc/XCAFDoc_ShapeTool.cxx index b39e3b0b5f..29edcfbdae 100644 --- a/src/XCAFDoc/XCAFDoc_ShapeTool.cxx +++ b/src/XCAFDoc/XCAFDoc_ShapeTool.cxx @@ -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); }