Henri Verbeet : wined3d: Don't crash in CreateAdditionalSwapChain() if the context array wasn't allocated yet.

Alexandre Julliard julliard at winehq.org
Wed Oct 15 10:08:41 CDT 2008


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Wed Oct 15 13:35:31 2008 +0200

wined3d: Don't crash in CreateAdditionalSwapChain() if the context array wasn't allocated yet.

---

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

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index b90ac1d..7e62d24 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1677,7 +1677,7 @@ error:
         HeapFree(GetProcessHeap(), 0, object->backBuffer);
         object->backBuffer = NULL;
     }
-    if(object->context[0])
+    if(object->context && object->context[0])
         DestroyContext(This, object->context[0]);
     if(object->frontBuffer) {
         IWineD3DSurface_GetParent(object->frontBuffer, &bufferParent);




More information about the wine-cvs mailing list