st/nine: Detach buffers in swapchain dtor.

BackBuffers can survive swapchain dtor if
the user has a reference on them.

The swapchain itself has no reference on the buffer.

Signed-off-by: Axel Davy <axel.davy@ens.fr>
This commit is contained in:
Axel Davy 2016-12-03 18:58:00 +01:00
parent 14875ebd83
commit 098ba64c4c

View file

@ -508,7 +508,7 @@ NineSwapChain9_dtor( struct NineSwapChain9 *This )
for (i = 0; i < This->num_back_buffers; i++) {
if (This->buffers[i])
NineUnknown_Release(NineUnknown(This->buffers[i]));
NineUnknown_Detach(NineUnknown(This->buffers[i]));
if (This->present_handles[i])
ID3DPresent_DestroyD3DWindowBuffer(This->present, This->present_handles[i]);
if (This->present_buffers[i])