fix memory leak (#150)

This commit is contained in:
Declan Hopkins authored and GitHub committed 2022-12-23 23:20:09 +01:00
1 parent 8b8500a1c9
commit e3726600fd
1 file changed
+4
@@ -77,6 +77,10 @@ void StaticPipeline::render(const StaticMesh* mesh,
if (frame->bbox->frustumCheck(
rendererCore->renderer3D.frustumPlanes.getAll(), model) ==
CoreBBoxFrustum::OUTSIDE_FRUSTUM) {
if (options && optionsManuallyAllocated) {
delete options;
}
delete infoBag;
return;
}
}