mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0028147: Data Exchange - NULL dereference while reading color from STEP file
StepVisual_StyledItem::Item() now does not call IsKind() on NULL object. Add several checks for NULL to import/export. Add test case bugs/step/bug28147
This commit is contained in:
@@ -67,10 +67,7 @@ void StepVisual_StyledItem::SetItem(const StepVisual_StyledItemTarget& theItem)
|
||||
|
||||
Handle(StepRepr_RepresentationItem) StepVisual_StyledItem::Item() const
|
||||
{
|
||||
if (myItem->IsKind(STANDARD_TYPE(StepRepr_RepresentationItem)))
|
||||
return Handle(StepRepr_RepresentationItem)::DownCast(myItem);
|
||||
else
|
||||
return NULL;
|
||||
return Handle(StepRepr_RepresentationItem)::DownCast(myItem);
|
||||
}
|
||||
|
||||
StepVisual_StyledItemTarget StepVisual_StyledItem::ItemAP242() const
|
||||
|
Reference in New Issue
Block a user