From: ichesnok Date: Mon, 27 Nov 2023 14:29:00 +0000 (+0000) Subject: 0033540: Data Exchange - Segmentation fault on loading model X-Git-Tag: V7_8_0~11 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=a6e425d0a69523641e5ebb8653650006046a0af0;p=occt.git 0033540: Data Exchange - Segmentation fault on loading model Implemented workaround to avoid crash on out-of-ISO files --- diff --git a/src/RWStepVisual/RWStepVisual_RWContextDependentOverRidingStyledItem.cxx b/src/RWStepVisual/RWStepVisual_RWContextDependentOverRidingStyledItem.cxx index 92dd7c1455..bf19ce3f67 100644 --- a/src/RWStepVisual/RWStepVisual_RWContextDependentOverRidingStyledItem.cxx +++ b/src/RWStepVisual/RWStepVisual_RWContextDependentOverRidingStyledItem.cxx @@ -85,6 +85,10 @@ void RWStepVisual_RWContextDependentOverRidingStyledItem::ReadStep aStyleContext->SetValue(i5,aStyleContextItem); } } + else + { + aStyleContext = new StepVisual_HArray1OfStyleContextSelect(); + } //--- Initialisation of the read entity ---