diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-03-19 00:03:19 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-03-19 00:03:42 +0200 |
commit | 969ed536806dce1fe2fa8fc9b312f1c80e671d84 (patch) | |
tree | 3e8c7e74cbecf7aefe250b03a72651dd781bf8ed /indra/newview/llvosky.cpp | |
parent | f462037b8e3474115a1f039ce0cd56c98e320227 (diff) | |
parent | c99e3167ed8549bc13d7df03b1e12dc15b0a080f (diff) |
Merge branch 'release/2025.03' into release/2025.04
Diffstat (limited to 'indra/newview/llvosky.cpp')
-rw-r--r-- | indra/newview/llvosky.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index ab8d0d2564..38c702c4ca 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -100,8 +100,16 @@ LLSkyTex::LLSkyTex() : void LLSkyTex::init(bool isShiny) { mIsShiny = isShiny; - mSkyData = new LLColor4[(U32)(SKYTEX_RESOLUTION * SKYTEX_RESOLUTION)]; - mSkyDirs = new LLVector3[(U32)(SKYTEX_RESOLUTION * SKYTEX_RESOLUTION)]; + try + { + mSkyData = new LLColor4[(U32)(SKYTEX_RESOLUTION * SKYTEX_RESOLUTION)]; + mSkyDirs = new LLVector3[(U32)(SKYTEX_RESOLUTION * SKYTEX_RESOLUTION)]; + } + catch (std::bad_alloc&) + { + LLError::LLUserWarningMsg::showOutOfMemory(); + LL_ERRS() << "Failed to allocate memory for sky texture data" << LL_ENDL; + } for (S32 i = 0; i < 2; ++i) { |