summaryrefslogtreecommitdiff
path: root/indra/llmath/llvolume.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-08-08 07:30:46 +0800
committerErik Kundiman <erik@megapahit.org>2025-08-08 07:37:27 +0800
commitcfc4f075a82f9dc1156fce6994083143de6727a8 (patch)
tree2948ea5c6ebfbbc15721a2838804d6a766742887 /indra/llmath/llvolume.cpp
parent73fdef6693017f1160875d1f7a79875945df3929 (diff)
parent55f1c8b9797836c9816528bb5b772eb83b083b50 (diff)
Merge tag 'Second_Life_Release#55f1c8b9-2025.06' into 2025.06
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 d56891cab3..e5521e0ffc 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)