Skip to content

Commit b8a4d74

Browse files
committed
fix occasional crash due to small buffer
1 parent 54fb74e commit b8a4d74

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

source/VulkanRenderer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1217,7 +1217,7 @@ private void DisposeUnusued()
12171217
}
12181218

12191219
//dispose unused meshes
1220-
Span<RendererKey> toRemoveKeys = stackalloc RendererKey[256];
1220+
Span<RendererKey> toRemoveKeys = stackalloc RendererKey[Math.Max(pipelineKeys.Length, meshKeys.Length)];
12211221
for (int i = 0; i < meshKeys.Length; i++)
12221222
{
12231223
RendererKey key = meshKeys[i];

0 commit comments

Comments
 (0)