mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03: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