From 3b10414c632e73d66d2840ddcd474a79fa120540 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 31 Aug 2018 11:47:18 -0700 Subject: Adding optional flags to settings objects. --- indra/newview/llenvironment.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llenvironment.cpp') diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index 6e19df0a94..3a1aec6319 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -444,11 +444,15 @@ F32 LLEnvironment::getWaterHeight() const bool LLEnvironment::getIsSunUp() const { + if (!mCurrentEnvironment || !mCurrentEnvironment->getSky()) + return false; return mCurrentEnvironment->getSky()->getIsSunUp(); } bool LLEnvironment::getIsMoonUp() const { + if (!mCurrentEnvironment || !mCurrentEnvironment->getSky()) + return false; return mCurrentEnvironment->getSky()->getIsMoonUp(); } -- cgit v1.2.3