(D3D) Set vertex_buf / texture pointer to NULL at end of wrapper

functions
This commit is contained in:
twinaphex 2014-09-13 18:57:12 +02:00
parent 548d9fea6c
commit 7366b43588
2 changed files with 2 additions and 2 deletions

View File

@ -78,6 +78,7 @@ void d3d_texture_free(LPDIRECT3DTEXTURE tex)
{
if (tex)
tex->Release();
tex = NULL;
}
LPDIRECT3DVERTEXBUFFER d3d_vertex_buffer_new(LPDIRECT3DDEVICE dev,
@ -107,6 +108,7 @@ void d3d_vertex_buffer_free(LPDIRECT3DVERTEXBUFFER buf)
{
if (buf)
buf->Release();
buf = NULL;
}
void d3d_set_stream_source(LPDIRECT3DDEVICE dev, unsigned stream_no,

View File

@ -10,9 +10,7 @@ static void renderchain_clear(void *data)
d3d_video_t *d3d = (d3d_video_t*)data;
d3d_texture_free(d3d->tex);
d3d->tex = NULL;
d3d_vertex_buffer_free(d3d->vertex_buf);
d3d->vertex_buf = NULL;
#ifdef _XBOX360
if (d3d->vertex_decl)