summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2024-07-16 12:21:47 +0200
committerGuru <alexandrgproductengine@lindenlab.com>2024-07-16 17:41:35 +0200
commit631379cbc0a3a48bc578ce2e2d9ccef31c8cfc23 (patch)
treef459fced6a951c197b326a2850c79a5df3c4726a /indra
parentc8310aaea2fe6af7b66780c32afb226d1b4dc2ad (diff)
#2034 BugSplat Crash #1494883: LLCullResult::clear(3983)
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llspatialpartition.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index 05c5bb14c6..2ff9ef1544 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -3978,12 +3978,14 @@ void LLCullResult::clear()
for (U32 i = 0; i < LLRenderPass::NUM_RENDER_TYPES; i++)
{
- for (U32 j = 0; j < mRenderMapSize[i]; j++)
+ drawinfo_list_t& render_map = mRenderMap[i];
+ U32 render_map_size = llmin((U32)render_map.size(), mRenderMapSize[i]);
+ for (U32 j = 0; j < render_map_size; j++)
{
- mRenderMap[i][j] = 0;
+ render_map[j] = 0;
}
mRenderMapSize[i] = 0;
- mRenderMapEnd[i] = &(mRenderMap[i][0]);
+ mRenderMapEnd[i] = &render_map.front();
}
}