diff options
| author | Rider Linden <rider@lindenlab.com> | 2025-08-24 14:29:24 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-24 14:29:24 -0700 |
| commit | f25c2a56c0c8079163e9ef18f6a9e590341b1e1a (patch) | |
| tree | a3fa4bd843f919575aaddf0928eff38bae7d7b04 /indra/llmath/llvolume.cpp | |
| parent | 96023976f5af0b9af8e8d066d9ad4eea213f53ee (diff) | |
| parent | 375158eb6450a0291ec1a0f55714fbf19a8287eb (diff) | |
Merge pull request #4602 from secondlife/rider/release_to_luaedit
Rider/release to luaedit
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) |
