Module: wine Branch: master Commit: 27a6bb5f081c6f1b5c48f2346ee6d35a138ba776 URL: http://source.winehq.org/git/wine.git/?a=commit;h=27a6bb5f081c6f1b5c48f2346e...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Mon Mar 23 08:30:17 2009 +0100
d3d10core: Only destroy the device when it doesn't have any references left.
---
dlls/d3d10core/device.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index 1406c38..7320f92 100644 --- a/dlls/d3d10core/device.c +++ b/dlls/d3d10core/device.c @@ -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; }