From 5d760b1ca8acff9e19f2ab43528878b3c0c81153 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Tue, 11 Jul 2000 22:05:21 +0000 Subject: [PATCH] Check for NULL flipchain and just return the current surface if it happens. --- dlls/ddraw/dsurface/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/ddraw/dsurface/main.c b/dlls/ddraw/dsurface/main.c index edeec91a16d..700b4c7175b 100644 --- a/dlls/ddraw/dsurface/main.c +++ b/dlls/ddraw/dsurface/main.c @@ -88,6 +88,11 @@ IDirectDrawSurface4Impl* _common_find_flipto( int i,j,flipable=0; struct _surface_chain *chain = This->s.chain; + if (!chain) { + ERR("No flip chain? -> returning This.\n"); + return This; + } + /* if there was no override flipto, look for current backbuffer */ if (!flipto) { /* walk the flip chain looking for backbuffer */