mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 14:14:47 +01:00
add guardlines to HeapAlloc too in case bitmap creation fails
This commit is contained in:
parent
9605f4a4c4
commit
6b0fbce7f8
@ -1132,7 +1132,7 @@ HRESULT __stdcall ddraw_CreateSurface(IDirectDrawImpl *This, LPDDSURFACEDESC lpD
|
||||
Surface->bmi->bmiHeader.biHeight = -Surface->height;
|
||||
|
||||
if (!Surface->bitmap)
|
||||
Surface->surface = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, Surface->lPitch * Surface->height * Surface->lXPitch);
|
||||
Surface->surface = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, Surface->lPitch * (Surface->height + 200) * Surface->lXPitch);
|
||||
|
||||
SelectObject(Surface->hDC, Surface->bitmap);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user