improved safe.

This commit is contained in:
2024-03-16 00:41:20 +08:00
parent 35b7c9651f
commit 60ba3e4df2
6 changed files with 14 additions and 8 deletions

View File

@@ -38,13 +38,10 @@ void RenderCmdBuffer::SetFBO(Framebuffer *fb)
clear_values[cv_count-1].depthStencil.depth = 1.0f;
clear_values[cv_count-1].depthStencil.stencil = 0;
}
else
else if(clear_values)
{
if(clear_values)
{
hgl_free(clear_values);
clear_values=nullptr;
}
hgl_free(clear_values);
clear_values=nullptr;
}
render_area.offset.x=0;

View File

@@ -161,6 +161,8 @@ Texture2DArray *RenderResource::CreateTexture2DArray(const AnsiString &name,cons
if(ta)
Add(ta);
else
return nullptr;
#ifdef _DEBUG
DebugUtils *du=device->GetDebugUtils();