1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-24 17:49:52 +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 "main.h"
#include "surface.h" #include "surface.h"
#define MAX_HOOKS 16
BOOL mouse_active = FALSE; BOOL mouse_active = FALSE;
int yAdjust = 0; int yAdjust = 0;

View File

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