Alexander Dorofeyev : wined3d: Fix not released swapchain in some codepaths .
Alexandre Julliard
julliard at winehq.org
Tue Jan 22 06:01:46 CST 2008
Module: wine
Branch: master
Commit: d9567b762759f58b52eb649ba068002790f5316f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=d9567b762759f58b52eb649ba068002790f5316f
Author: Alexander Dorofeyev <alexd4 at inbox.lv>
Date: Sun Jan 20 20:18:12 2008 -0800
wined3d: Fix not released swapchain in some codepaths.
---
dlls/wined3d/surface.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 9243777..c6aa7a9 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1121,13 +1121,14 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_UnlockRect(IWineD3DSurface *iface) {
IWineD3DSurface_GetContainer(iface, &IID_IWineD3DSwapChain, (void **)&swapchain);
if(swapchain || (myDevice->render_targets && iface == myDevice->render_targets[0])) {
+ if(swapchain) IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain);
+
if(wined3d_settings.rendertargetlock_mode == RTL_DISABLE) {
static BOOL warned = FALSE;
if(!warned) {
ERR("The application tries to write to the render target, but render target locking is disabled\n");
warned = TRUE;
}
- if(swapchain) IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain);
goto unlock_end;
}
More information about the wine-cvs
mailing list