diff options
Diffstat (limited to 'indra/newview/llspatialpartition.cpp')
-rw-r--r-- | indra/newview/llspatialpartition.cpp | 8 |
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(); } } |