0031082: Visualization - crash on display if there are no lights in the view
authorkgv <kgv@opencascade.com>
Sun, 20 Oct 2019 11:53:13 +0000 (14:53 +0300)
committerapn <apn@opencascade.com>
Thu, 24 Oct 2019 14:43:38 +0000 (17:43 +0300)
OpenGl_View - fixed uninitialized property myLights.

src/OpenGl/OpenGl_View.cxx

index d016a2e..4179fa2 100644 (file)
@@ -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);