From 35246a95039e242c6167f6c52a0c6cc49e004f23 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Tue, 9 Jul 2024 17:00:31 +0200 Subject: #1959 BugSplat Crash #1489790: VCRUNTIME140!memcmp(72) --- indra/llmath/llvolume.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 1c0befb3da..56ac22ca18 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -5462,7 +5462,11 @@ bool LLVolumeFace::cacheOptimize(bool gen_tangents) U32 stream_count = data.w.empty() ? 4 : 5; - S32 vert_count = static_cast(meshopt_generateVertexRemapMulti(&remap[0], nullptr, data.p.size(), data.p.size(), mos, stream_count)); + S32 vert_count = 0; + if (!data.p.empty()) + { + vert_count = static_cast(meshopt_generateVertexRemapMulti(&remap[0], nullptr, data.p.size(), data.p.size(), mos, stream_count)); + } if (vert_count < 65535 && vert_count != 0) { -- cgit v1.2.3