add guardlines to HeapAlloc too in case bitmap creation fails
This commit is contained in:
parent
9605f4a4c4
commit
6b0fbce7f8
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue