]> OCCT Git - occt.git/commitdiff
0033540: Data Exchange - Segmentation fault on loading model
authorichesnok <ichesnok@opencascade.com>
Mon, 27 Nov 2023 14:29:00 +0000 (14:29 +0000)
committerdpasukhi <dpasukhi@opencascade.com>
Mon, 4 Dec 2023 15:53:07 +0000 (15:53 +0000)
Implemented workaround to avoid crash on out-of-ISO files

src/RWStepVisual/RWStepVisual_RWContextDependentOverRidingStyledItem.cxx

index 92dd7c1455bd386a8b260aa2b970ff272bece48e..bf19ce3f67c193151eba79dd44b79cc582b21880 100644 (file)
@@ -85,6 +85,10 @@ void RWStepVisual_RWContextDependentOverRidingStyledItem::ReadStep
              aStyleContext->SetValue(i5,aStyleContextItem);
          }
        }
+       else
+       {
+         aStyleContext = new StepVisual_HArray1OfStyleContextSelect();
+       }
 
        //--- Initialisation of the read entity ---