Add several checks for null.
aDimObj->SetClassOfTolerance(aHolle, aFV, aG);
}
- if (!aCRI.IsNull() && aCRI->ItemElement()->Length() > 0)
+ if (!aCRI.IsNull() && !aCRI->ItemElement().IsNull() && aCRI->ItemElement()->Length() > 0)
{
//get modifiers
XCAFDimTolObjects_DimensionModifiersSequence aModifiers;
Standard_Integer StepVisual_PresentationStyleAssignment::NbStyles () const
{
- return styles->Length();
+ return (styles.IsNull()) ? 0 : styles->Length();
}
Standard_Integer StepVisual_SurfaceSideStyle::NbStyles () const
{
- return styles->Length();
+ return (styles.IsNull()) ? 0 : styles->Length();
}
--- /dev/null
+# !!!! This file is generated automatically, do not edit manually! See end script
+set filename bug29633_nist_ctc_05_asme1_ap242-1.stp
+
+set ref_data {
+
+ NbOfDimensions : 28
+ NbOfDimensionalSize : 1
+ NbOfDimensionalLocation: 5
+ NbOfAngular : 0
+ NbOfWithPath : 0
+ NbOfCommonLabels : 2
+ NbOfTolerances : 10
+ NbOfGTWithModifiers : 0
+ NbOfGTWithMaxTolerance : 0
+ NbOfGTWithDatums : 8
+ NbOfDatumFeature : 2
+ NbOfAttachedDatum : 9
+ NbOfDatumTarget : 0
+}