diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c index 04cfcef1f..7f7ba1858 100644 --- a/src/render/direct3d/SDL_render_d3d.c +++ b/src/render/direct3d/SDL_render_d3d.c @@ -1566,6 +1566,15 @@ D3D_Reset(SDL_Renderer * renderer) } } + /* Release all vertex buffers */ + int i; + for (i = 0; i < SDL_arraysize(data->vertexBuffers); ++i) { + if (data->vertexBuffers[i]) { + IDirect3DVertexBuffer9_Release(data->vertexBuffers[i]); + } + data->vertexBuffers[i] = NULL; + } + result = IDirect3DDevice9_Reset(data->device, &data->pparams); if (FAILED(result)) { if (result == D3DERR_DEVICELOST) {