Roderick Colenbrander : wined3d: Fix ddraw-opengl surface free bug.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Sep 10 10:18:08 CDT 2007


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

Author: Roderick Colenbrander <thunderbird2k at gmx.net>
Date:   Mon Sep 10 12:18:15 2007 +0200

wined3d: Fix ddraw-opengl surface free bug.

---

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

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 49c2218..2acd068 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -366,7 +366,7 @@ ULONG WINAPI IWineD3DSurfaceImpl_Release(IWineD3DSurface *iface) {
              * the primary render target exists. Otherwise lastActiveRenderTarget is garbage, see above.
              * When destroying the primary rt, Uninit3D will activate a context before doing anything
              */
-            if(device->render_targets[0]) {
+            if(device->render_targets && device->render_targets[0]) {
                 ActivateContext(device, device->lastActiveRenderTarget, CTXUSAGE_RESOURCELOAD);
             }
 




More information about the wine-cvs mailing list