Fixing some potential crashes

This commit is contained in:
Dynamitos committed 2025-04-08 22:01:42 +02:00
1 parent 875ae450e7
commit e355f3e703
7 files changed
+22 -97

No files matched your search

+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();