d3d10core: Only destroy the device when it doesn't have any references left.

This commit is contained in:
Henri Verbeet 2009-03-23 08:30:17 +01:00 committed by Alexandre Julliard
parent 775ea907a3
commit 27a6bb5f08
1 changed files with 4 additions and 1 deletions

View File

@ -75,7 +75,10 @@ static ULONG STDMETHODCALLTYPE d3d10_device_inner_Release(IUnknown *iface)
TRACE("%p decreasing refcount to %u\n", This, refcount);
if (This->wined3d_device) IWineD3DDevice_Release(This->wined3d_device);
if (!refcount)
{
if (This->wined3d_device) IWineD3DDevice_Release(This->wined3d_device);
}
return refcount;
}