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

Henri Verbeet hverbeet at codeweavers.com
Wed Oct 15 06:35:31 CDT 2008


---
 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);
-- 
1.5.6.4



--------------080109090901000804080804--



More information about the wine-patches mailing list