From 764e97a419a9247721852143f57ac1cd9f0b7730 Mon Sep 17 00:00:00 2001 From: ika Date: Fri, 6 Oct 2017 16:14:09 +0300 Subject: [PATCH] refs #478: fast fixes --- src/STEPCAFControl/STEPCAFControl_Reader.cxx | 6 ++++-- src/StepVisual/StepVisual_PresentationStyleAssignment.cxx | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/STEPCAFControl/STEPCAFControl_Reader.cxx b/src/STEPCAFControl/STEPCAFControl_Reader.cxx index 07ba7d3d93..a1234d9d1d 100644 --- a/src/STEPCAFControl/STEPCAFControl_Reader.cxx +++ b/src/STEPCAFControl/STEPCAFControl_Reader.cxx @@ -3074,7 +3074,8 @@ TDF_Label STEPCAFControl_Reader::createGDTObjectInXCAF(const Handle(Standard_Tra { TDF_Label aShL; aSTool->Search(aSh, aShL, Standard_True, Standard_True, Standard_True); - aShLS1.Append(aShL); + if (!aShL.IsNull()) + aShLS1.Append(aShL); } } if (!aSeqRI2.IsEmpty()) @@ -3092,7 +3093,8 @@ TDF_Label STEPCAFControl_Reader::createGDTObjectInXCAF(const Handle(Standard_Tra { TDF_Label aShL; aSTool->Search(aSh, aShL, Standard_True, Standard_True, Standard_True); - aShLS2.Append(aShL); + if (!aShL.IsNull()) + aShLS2.Append(aShL); } } } diff --git a/src/StepVisual/StepVisual_PresentationStyleAssignment.cxx b/src/StepVisual/StepVisual_PresentationStyleAssignment.cxx index f846b5dadd..0050f845c3 100644 --- a/src/StepVisual/StepVisual_PresentationStyleAssignment.cxx +++ b/src/StepVisual/StepVisual_PresentationStyleAssignment.cxx @@ -45,5 +45,5 @@ StepVisual_PresentationStyleSelect StepVisual_PresentationStyleAssignment::Style Standard_Integer StepVisual_PresentationStyleAssignment::NbStyles () const { - return styles->Length(); + return styles.IsNull() ? 0 : styles->Length(); }