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:
parent
4fe107c991
commit
2afe07189c
@ -21,8 +21,6 @@
|
||||
#include "main.h"
|
||||
#include "surface.h"
|
||||
|
||||
#define MAX_HOOKS 16
|
||||
|
||||
BOOL mouse_active = FALSE;
|
||||
int yAdjust = 0;
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user