diff --git a/dlls/d3d10core/device.c b/dlls/d3d10core/device.c index 1406c38ddf6..7320f92b9f2 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; }