diff --git a/reactos/dll/directx/ddraw/Surface/createsurface.c b/reactos/dll/directx/ddraw/Surface/createsurface.c index 950af4595b2..7743031a5e9 100644 --- a/reactos/dll/directx/ddraw/Surface/createsurface.c +++ b/reactos/dll/directx/ddraw/Surface/createsurface.c @@ -54,6 +54,10 @@ Internal_CreateSurface( LPDDRAWI_DIRECTDRAW_INT pDDraw, LPDDSURFACEDESC2 pDDSD, { return DDERR_INVALIDPARAMS; } + if (pDDraw->lpLcl->dwProcessId != GetCurrentProcessId() ) + { + return DDERR_INVALIDOBJECT; + } if(!(pDDSD->dwFlags & DDSD_HEIGHT) && !(pDDSD->dwFlags & DDSD_HEIGHT) && !(pDDSD->ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE))