From 8445efca811468657c7532b2b489ad2e0147c40a Mon Sep 17 00:00:00 2001
From: kgv <kgv@opencascade.com>
Date: Sun, 20 Oct 2019 14:53:13 +0300
Subject: [PATCH] 0031082: Visualization - crash on display if there are no
 lights in the view

OpenGl_View - fixed uninitialized property myLights.
---
 src/OpenGl/OpenGl_View.cxx | 1 +
 1 file changed, 1 insertion(+)

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);