mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0028797: Exceptrion is raised during reading attached STEP file.
Protection for null handle was added in the method RWStepVisual_RWPresentationStyleAssignment::ReadStep
This commit is contained in:
parent
6ae0790866
commit
b80d766ab9
@ -53,9 +53,12 @@ void RWStepVisual_RWPresentationStyleAssignment::ReadStep
|
||||
else {
|
||||
Handle(StepData_SelectMember) aMember;
|
||||
data->ReadMember(nsub1, i1, "null_style", ach, aMember);
|
||||
Standard_CString anEnumText = aMember->EnumText();
|
||||
Handle(StepVisual_NullStyleMember) aNullStyle = new StepVisual_NullStyleMember();
|
||||
aNullStyle->SetEnumText(0, anEnumText);
|
||||
if(!aMember.IsNull())
|
||||
{
|
||||
Standard_CString anEnumText = aMember->EnumText();
|
||||
aNullStyle->SetEnumText(0, anEnumText);
|
||||
}
|
||||
aStylesItem.SetValue(aNullStyle);
|
||||
}
|
||||
aStyles->SetValue(i1,aStylesItem);
|
||||
|
17
tests/bugs/step/bug28797
Normal file
17
tests/bugs/step/bug28797
Normal file
@ -0,0 +1,17 @@
|
||||
puts "========"
|
||||
puts "OCC28797"
|
||||
puts "========"
|
||||
puts ""
|
||||
#########################################################################
|
||||
# Data Exchange - Exception is raised during reading attached STEP file
|
||||
#########################################################################
|
||||
|
||||
set aFile [locate_data_file bug28797_36x60.step]
|
||||
|
||||
if {[catch {stepread $aFile a *}]} {
|
||||
puts "ERROR: OCC28797 is reproduced. Exception was raised during reading initial file."
|
||||
} else {
|
||||
tpcompound result
|
||||
}
|
||||
|
||||
checkview -display result -2d -path ${imagedir}/${test_image}.png
|
Loading…
x
Reference in New Issue
Block a user