Check for NULL flipchain and just return the current surface if it

happens.
This commit is contained in:
Marcus Meissner 2000-07-11 22:05:21 +00:00 committed by Alexandre Julliard
parent fb2273be7e
commit 5d760b1ca8
1 changed files with 5 additions and 0 deletions

View File

@ -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 */