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
2 changed files with 1 additions and 3 deletions
|
@ -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…
Reference in a new issue