1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

check if surface was created on DDBLT_COLORFILL (caused a crash on ts-ddraw, might not be needed on cnc-ddraw)

This commit is contained in:
FunkyFr3sh 2018-09-25 02:01:55 +02:00
parent 4fe107c991
commit 2afe07189c
2 changed files with 1 additions and 3 deletions

View File

@ -21,8 +21,6 @@
#include "main.h"
#include "surface.h"
#define MAX_HOOKS 16
BOOL mouse_active = FALSE;
int yAdjust = 0;

View File

@ -102,7 +102,7 @@ HRESULT __stdcall ddraw_surface_Blt(IDirectDrawSurfaceImpl *This, LPRECT lpDestR
}
#endif
if (dwFlags & DDBLT_COLORFILL)
if (This->surface && (dwFlags & DDBLT_COLORFILL))
{
int dst_w = lpDestRect->right - lpDestRect->left;
int dst_h = lpDestRect->bottom - lpDestRect->top;