diff options
| author | Callum Prentice <callum@lindenlab.com> | 2025-08-22 17:12:03 -0700 |
|---|---|---|
| committer | Callum Prentice <callum@lindenlab.com> | 2025-08-22 17:12:03 -0700 |
| commit | e935a8aebca4ae014b5f6b438612ac5674678fe6 (patch) | |
| tree | 531498d040a62c01d444fe91eb99afb091c7fff4 /indra/llmath/llvolume.cpp | |
| parent | bebd1b208e1b342fabf59844851124a91513e83b (diff) | |
| parent | cefee59b0e5fff683a50fe61633a9c14493d7145 (diff) | |
Merge branch 'develop' into callum/viewer-cef-2025-08
Diffstat (limited to 'indra/llmath/llvolume.cpp')
| -rw-r--r-- | indra/llmath/llvolume.cpp | 10 |
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) |
