Henri Verbeet : wined3d: Do not release a reference we do not have in IWineD3DSurfaceImpl_Flip().

Alexandre Julliard julliard at winehq.org
Fri Aug 20 10:19:15 CDT 2010


Module: wine
Branch: master
Commit: 910d3022c3b1881d6b1355b446598d29bdf2bef9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=910d3022c3b1881d6b1355b446598d29bdf2bef9

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Fri Aug 20 13:56:23 2010 +0200

wined3d: Do not release a reference we do not have in IWineD3DSurfaceImpl_Flip().

This fixes a regression introduced by 368e5eb87ae983e4ea2f66b3ca2f4154b36bbcda.

---

 dlls/wined3d/surface.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index ea66033..dfa124d 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -2739,7 +2739,7 @@ void flip_surface(IWineD3DSurfaceImpl *front, IWineD3DSurfaceImpl *back) {
 static HRESULT WINAPI IWineD3DSurfaceImpl_Flip(IWineD3DSurface *iface, IWineD3DSurface *override, DWORD Flags) {
     IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
     IWineD3DSwapChainImpl *swapchain = NULL;
-    HRESULT hr;
+
     TRACE("(%p)->(%p,%x)\n", This, override, Flags);
 
     /* Flipping is only supported on RenderTargets and overlays*/
@@ -2791,10 +2791,8 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_Flip(IWineD3DSurface *iface, IWineD3DS
     }
 
     /* Flipping a OpenGL surface -> Use WineD3DDevice::Present */
-    hr = IWineD3DSwapChain_Present((IWineD3DSwapChain *)swapchain,
+    return IWineD3DSwapChain_Present((IWineD3DSwapChain *)swapchain,
             NULL, NULL, swapchain->win_handle, NULL, 0);
-    IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain);
-    return hr;
 }
 
 /* Does a direct frame buffer -> texture copy. Stretching is done




More information about the wine-cvs mailing list