Commit 32704950 authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

Check for NULL before touching src.

parent aef19abc
......@@ -514,9 +514,11 @@ DIB_DirectDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
}
}
if (This->locked || ((IDirectDrawSurfaceImpl *)src)->locked) {
WARN(" Surface is busy, returning DDERR_SURFACEBUSY\n");
return DDERR_SURFACEBUSY;
if (src != NULL) {
if (This->locked || ((IDirectDrawSurfaceImpl *)src)->locked) {
WARN(" Surface is busy, returning DDERR_SURFACEBUSY\n");
return DDERR_SURFACEBUSY;
}
}
/* 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");
}
if (This->locked || ((IDirectDrawSurfaceImpl *)src)->locked) {
WARN(" Surface is busy, returning DDERR_SURFACEBUSY\n");
return DDERR_SURFACEBUSY;
if (src != NULL) {
if (This->locked || ((IDirectDrawSurfaceImpl *)src)->locked) {
WARN(" Surface is busy, returning DDERR_SURFACEBUSY\n");
return DDERR_SURFACEBUSY;
}
}
/* First, check if the possible override function handles this case */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment