Stefan Dösinger : wined3d: Only addref clippers if one exists.

Alexandre Julliard julliard at wine.codeweavers.com
Fri May 11 07:28:00 CDT 2007


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

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Thu May 10 21:45:51 2007 +0200

wined3d: Only addref clippers if one exists.

---

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

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 727f8b3..12681c4 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3504,7 +3504,9 @@ HRESULT WINAPI IWineD3DSurfaceImpl_GetClipper(IWineD3DSurface *iface, IWineD3DCl
     TRACE("(%p)->(%p)\n", This, clipper);
 
     *clipper = This->clipper;
-    IWineD3DClipper_AddRef(*clipper);
+    if(*clipper) {
+        IWineD3DClipper_AddRef(*clipper);
+    }
     return WINED3D_OK;
 }
 




More information about the wine-cvs mailing list