From ec4b477d0ac5ed78200c909ca1555a64a7e5cf32 Mon Sep 17 00:00:00 2001 From: sshutina Date: Thu, 24 Sep 2020 20:11:45 +0300 Subject: [PATCH] 0031786: Data Exchange - After the importing STEP file the free shape is empty - Fixed the exception --- src/STEPCAFControl/STEPCAFControl_Reader.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index 2573a8dc31..e14a630866 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -4354,8 +4354,10 @@ Standard_Boolean STEPCAFControl_Reader::ReadViews(const Handle(XSControl_WorkSes for (; anIter.More(); anIter.Next()) { if (anIter.Value()->IsKind(STANDARD_TYPE(StepRepr_MappedItem))) { Handle(StepRepr_MappedItem) anItem = Handle(StepRepr_MappedItem)::DownCast(anIter.Value()); - Handle(StepRepr_Representation) aRepr = anItem->MappingSource()->MappedRepresentation(); - collectViewShapes(theWS, theDoc, aRepr, aShapes); + if (Handle(StepRepr_Representation) aRepr = anItem->MappingSource()->MappedRepresentation()) + { + collectViewShapes(theWS, theDoc, aRepr, aShapes); + } } else if (anIter.Value()->IsKind(STANDARD_TYPE(StepVisual_AnnotationOccurrence)) || anIter.Value()->IsKind(STANDARD_TYPE(StepVisual_DraughtingCallout))) { -- 2.39.5