mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-07-20 06:09:50 +08:00
0029633: Data Exchange - access violation in StepVisual_PresentationStyleAssignment while translating STEP file
Add several checks for null.
This commit is contained in:
@@ -45,5 +45,5 @@ StepVisual_PresentationStyleSelect StepVisual_PresentationStyleAssignment::Style
|
||||
|
||||
Standard_Integer StepVisual_PresentationStyleAssignment::NbStyles () const
|
||||
{
|
||||
return styles->Length();
|
||||
return (styles.IsNull()) ? 0 : styles->Length();
|
||||
}
|
||||
|
||||
@@ -58,5 +58,5 @@ StepVisual_SurfaceStyleElementSelect StepVisual_SurfaceSideStyle::StylesValue(co
|
||||
|
||||
Standard_Integer StepVisual_SurfaceSideStyle::NbStyles () const
|
||||
{
|
||||
return styles->Length();
|
||||
return (styles.IsNull()) ? 0 : styles->Length();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user