From 8d5ca6501abaa4645d24de6598e6811ca55a1d94 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 30 Jul 2010 03:21:13 +0000 Subject: [PATCH] - Add a NULL FrontCopySurface check to D3DFB::GetCurrentScreen, because this can apparently be NULL when starting with -timedemo or -playdemo. (But it never happened for me in the debugger.) SVN r2474 (trunk) --- src/win32/fb_d3d9.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/win32/fb_d3d9.cpp b/src/win32/fb_d3d9.cpp index 922c63a29..b2c8e1bfa 100644 --- a/src/win32/fb_d3d9.cpp +++ b/src/win32/fb_d3d9.cpp @@ -1772,7 +1772,7 @@ IDirect3DTexture9 *D3DFB::GetCurrentScreen(D3DPOOL pool) assert(pool == D3DPOOL_SYSTEMMEM || pool == D3DPOOL_DEFAULT); - if (FAILED(FrontCopySurface->GetDesc(&desc))) + if (FrontCopySurface == NULL || FAILED(FrontCopySurface->GetDesc(&desc))) { return NULL; }