From: kgv Date: Sun, 20 Oct 2019 11:53:13 +0000 (+0300) Subject: 0031082: Visualization - crash on display if there are no lights in the view X-Git-Tag: V7_5_0_beta~370 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=8445efca811468657c7532b2b489ad2e0147c40a;p=occt-copy.git 0031082: Visualization - crash on display if there are no lights in the view OpenGl_View - fixed uninitialized property myLights. --- diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index d016a2e2d5..4179fa2bea 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -97,6 +97,7 @@ OpenGl_View::OpenGl_View (const Handle(Graphic3d_StructureManager)& theMgr, Handle(Graphic3d_CLight) aLight = new Graphic3d_CLight (Graphic3d_TOLS_AMBIENT); aLight->SetHeadlight (false); aLight->SetColor (Quantity_NOC_WHITE); + myLights = new Graphic3d_LightSet(); myNoShadingLight = new Graphic3d_LightSet(); myNoShadingLight->Add (aLight);