summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-09-29 23:39:00 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-04-29 19:41:22 +0300
commit904b16a0a7fddb1cd36de8a33d5475df93d9cabe (patch)
tree58aaa39693df3dee6c2b14d6977205c7cd52d3c5 /indra/newview/llviewerwindow.cpp
parentac0c9a7412334ebda49467c14b3916618b56a8dc (diff)
SL-17124 switchContext and loadShaderFile crashes
- Do not try initializing shaders if requirements are not met or if window does not exist - Warn user before closing window. Situation is unexpected, there is chance of more issues, like a freeze or a crash on close() - mHasMultitexture is a solid requirement, if it is not present, we won't be able to run
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 42e21f7130..8e565bbdca 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1914,12 +1914,6 @@ LLViewerWindow::LLViewerWindow(const Params& p)
p.ignore_pixel_depth,
gSavedSettings.getBOOL("RenderDeferred") ? 0 : gSavedSettings.getU32("RenderFSAASamples")); //don't use window level anti-aliasing if FBOs are enabled
- if (!LLViewerShaderMgr::sInitialized)
- { //immediately initialize shaders
- LLViewerShaderMgr::sInitialized = TRUE;
- LLViewerShaderMgr::instance()->setShaders();
- }
-
if (NULL == mWindow)
{
LLSplashScreen::update(LLTrans::getString("StartupRequireDriverUpdate"));
@@ -1938,6 +1932,12 @@ LLViewerWindow::LLViewerWindow(const Params& p)
#endif
LLAppViewer::instance()->fastQuit(1);
}
+ else if (!LLViewerShaderMgr::sInitialized)
+ {
+ //immediately initialize shaders
+ LLViewerShaderMgr::sInitialized = TRUE;
+ LLViewerShaderMgr::instance()->setShaders();
+ }
if (!LLAppViewer::instance()->restoreErrorTrap())
{