set lpSurface on failure

This commit is contained in:
FunkyFr3sh 2023-11-19 02:25:16 +01:00
parent 1e9f3a0ab8
commit 91796c71c1
2 changed files with 3 additions and 1 deletions

View file

@ -972,6 +972,8 @@ HRESULT dds_Lock(
lpDestRect->right > This->width ||
lpDestRect->bottom > This->height)
{
lpDDSurfaceDesc->lpSurface = NULL;
return DDERR_INVALIDPARAMS;
}