From 9d6f22002c9b2b30f3a5ffce21dfa445462fdb16 Mon Sep 17 00:00:00 2001 From: "H. Verbeet" Date: Sat, 18 Nov 2006 17:08:17 +0100 Subject: [PATCH] wined3d: Only copy the depth buffer if there is one. --- dlls/wined3d/drawprim.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 7b60054366a..b3ee4ce45b7 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -2237,6 +2237,9 @@ static void depth_copy(IWineD3DDevice *iface) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; IWineD3DSurfaceImpl *depth_stencil = (IWineD3DSurfaceImpl *)This->depthStencilBuffer; + /* Only copy the depth buffer if there is one. */ + if (!depth_stencil) return; + /* TODO: Make this work for modes other than FBO */ if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) return;