Check for NULL before touching src.

This commit is contained in:
Paul Vriens 2005-03-09 18:42:35 +00:00 committed by Alexandre Julliard
parent aef19abc82
commit 327049504b
1 changed files with 10 additions and 6 deletions

View File

@ -514,9 +514,11 @@ DIB_DirectDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
} }
} }
if (This->locked || ((IDirectDrawSurfaceImpl *)src)->locked) { if (src != NULL) {
WARN(" Surface is busy, returning DDERR_SURFACEBUSY\n"); if (This->locked || ((IDirectDrawSurfaceImpl *)src)->locked) {
return DDERR_SURFACEBUSY; WARN(" Surface is busy, returning DDERR_SURFACEBUSY\n");
return DDERR_SURFACEBUSY;
}
} }
/* First, check if the possible override function handles this case */ /* First, check if the possible override function handles this case */
@ -990,9 +992,11 @@ DIB_DirectDrawSurface_BltFast(LPDIRECTDRAWSURFACE7 iface, DWORD dstx,
TRACE(" srcrect: NULL\n"); TRACE(" srcrect: NULL\n");
} }
if (This->locked || ((IDirectDrawSurfaceImpl *)src)->locked) { if (src != NULL) {
WARN(" Surface is busy, returning DDERR_SURFACEBUSY\n"); if (This->locked || ((IDirectDrawSurfaceImpl *)src)->locked) {
return DDERR_SURFACEBUSY; WARN(" Surface is busy, returning DDERR_SURFACEBUSY\n");
return DDERR_SURFACEBUSY;
}
} }
/* First, check if the possible override function handles this case */ /* First, check if the possible override function handles this case */