This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository direct3d.
View the commit online.
commit 67ed247e34c2bc31e96899359964cc4dded23be7
Author: Vincent Torri <vto...@outlook.fr>
AuthorDate: Tue Jun 18 14:49:40 2024 +0200
correctly free mem
---
src/d3d_7.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/d3d_7.c b/src/d3d_7.c
index c6ae763..4998021 100644
--- a/src/d3d_7.c
+++ b/src/d3d_7.c
@@ -1023,10 +1023,11 @@ void object_free(Object *o)
if (!o)
return ;
- if (o->texture_view)
+ if (o->type == OBJECT_TYPE_TEXTURE)
+ {
ID3D11ShaderResourceView_Release(o->texture_view);
- if (o->texture)
ID3D11Texture2D_Release(o->texture);
+ }
ID3D11Buffer_Release(o->index_buffer);
ID3D11Buffer_Release(o->vertex_buffer);
free(o);
@@ -1132,7 +1133,7 @@ void d3d_render(D3d *d3d)
0);
/* pixel shader stage */
- if (objects[i]->texture_view)
+ if (objects[i]->type == OBJECT_TYPE_TEXTURE)
ID3D11DeviceContext_PSSetShaderResources(d3d->d3d_device_ctx,
0,
1,
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.