Fixing some potential crashes

This commit is contained in:
Dynamitos
2025-04-08 22:01:42 +02:00
parent 875ae450e7
commit e355f3e703
7 changed files with 22 additions and 97 deletions
+1 -1
View File
@@ -447,7 +447,7 @@ Gfx::OTopLevelAS Graphics::createTopLevelAccelerationStructure(const Gfx::TopLev
}
void Graphics::buildBottomLevelAccelerationStructures(Array<Gfx::PBottomLevelAS> data) {
if (!supportRayTracing())
if (!supportRayTracing() || data.empty())
return;
Gfx::PShaderBuffer verticesBuffer = StaticMeshVertexData::getInstance()->getPositionBuffer();
Gfx::PIndexBuffer indexBuffer = StaticMeshVertexData::getInstance()->getIndexBuffer();