summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-07-26 21:21:08 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-07-27 08:43:25 +0300
commitfaeded36578612a9bea970fd5b2f02e5d73e0af1 (patch)
treea42f6060827dd59f1635a0daefa021add9af19af /indra/newview
parentcdff7169083f054818bd54f43d602dc229a067c4 (diff)
SL-17827 Crash at LLCamera::setViewHeightInPixels
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewerwindow.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index bc69fd80db..2deb2928b9 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2511,10 +2511,11 @@ void LLViewerWindow::reshape(S32 width, S32 height)
//glViewport(0, 0, width, height );
- if (height > 0)
+ LLViewerCamera * camera = LLViewerCamera::getInstance(); // simpleton, might not exist
+ if (height > 0 && camera)
{
- LLViewerCamera::getInstance()->setViewHeightInPixels( mWorldViewRectRaw.getHeight() );
- LLViewerCamera::getInstance()->setAspect( getWorldViewAspectRatio() );
+ camera->setViewHeightInPixels( mWorldViewRectRaw.getHeight() );
+ camera->setAspect( getWorldViewAspectRatio() );
}
calcDisplayScale();