1
0
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:
kgv
2016-11-23 15:53:48 +03:00
committed by apn
parent bb2cf06962
commit aff1875311
4 changed files with 33 additions and 7 deletions

View File

@@ -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