1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

0025168: STEP Writer - empty AppliedGroupAssignment can cause exception in RWStepAP214_RWAppliedGroupAssignment class

Function WriteStep is fixed
This commit is contained in:
drazmyslovich 2014-08-19 14:28:48 +02:00 committed by bugmaster
parent 38deba5d7f
commit 8a8be2aabe

View File

@ -83,9 +83,12 @@ void RWStepAP214_RWAppliedGroupAssignment::WriteStep (StepData_StepWriter& SW,
// Own fields of AppliedGroupAssignment
SW.OpenSub();
for (Standard_Integer i1=1; i1 <= ent->Items()->Length(); i1++ ) {
StepAP214_GroupItem Var0 = ent->Items()->Value(i1);
SW.Send (Var0.Value());
if (!ent->Items().IsNull())
{
for (Standard_Integer i1=1; i1 <= ent->Items()->Length(); i1++ ) {
StepAP214_GroupItem Var0 = ent->Items()->Value(i1);
SW.Send (Var0.Value());
}
}
SW.CloseSub();
}