summaryrefslogtreecommitdiff
path: root/indra/llmath/llvolume.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-08-14 11:17:35 +0300
committerGitHub <noreply@github.com>2025-08-14 11:17:35 +0300
commit6f072c2121fcb6f00ccc773d0ff4edc5cbfb013b (patch)
tree62c4967d6be428907691f133e794654b25c5d140 /indra/llmath/llvolume.cpp
parent8145d99f80d55c4da88adb6909386bd5c25fd743 (diff)
parentd859557c1865b0636ce2a407d2e7b814fbfc1eb6 (diff)
Merge 2025.06 into develop
Merge 2025.06 into develop
Diffstat (limited to 'indra/llmath/llvolume.cpp')
-rw-r--r--indra/llmath/llvolume.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 1e7dfd18f2..7c60253618 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -5711,7 +5711,15 @@ bool LLVolumeFace::cacheOptimize(bool gen_tangents)
S32 vert_count = 0;
if (!data.p.empty())
{
- vert_count = static_cast<S32>(meshopt_generateVertexRemapMulti(&remap[0], nullptr, data.p.size(), data.p.size(), mos, stream_count));
+ try
+ {
+ vert_count = static_cast<S32>(meshopt_generateVertexRemapMulti(&remap[0], nullptr, data.p.size(), data.p.size(), mos, stream_count));
+ }
+ catch (std::bad_alloc&)
+ {
+ LLError::LLUserWarningMsg::showOutOfMemory();
+ LL_ERRS("LLCoros") << "Failed to allocate memory for VertexRemap: " << (S32)data.p.size() << LL_ENDL;
+ }
}
if (vert_count < 65535 && vert_count != 0)