Fixing out of bounds array access with non-nanite assets.

#jira none
#rb zach.bethel
#fyi ola.olsson
#preflight none

[CL 18649580 by christopher waters in 5.0 branch]
This commit is contained in:
christopher waters
2022-01-18 17:35:13 -05:00
parent 33aad52896
commit 3346414543

View File

@@ -174,7 +174,7 @@ void FVirtualShadowMapArrayCacheManager::FInvalidatingPrimitiveCollector::Add(co
for (auto& CacheEntry : Manager.PrevCacheEntries)
{
TBitArray<>& RenderedPrimitives = CacheEntry.Value->RenderedPrimitives;
if (bIsNaniteMesh || (PersistentPrimitiveIndex <= RenderedPrimitives.Num() && RenderedPrimitives[PersistentPrimitiveIndex]))
if (bIsNaniteMesh || (PersistentPrimitiveIndex < RenderedPrimitives.Num() && RenderedPrimitives[PersistentPrimitiveIndex]))
{
if (!bIsNaniteMesh)
{