SL-17827 Crash at LLCamera::setViewHeightInPixels

meow-7.2.2
Andrey Kleshchev 2022-07-26 21:21:08 +03:00
parent cdff716908
commit faeded3657
1 changed files with 4 additions and 3 deletions

View File

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