diff --git a/reactos/subsystems/win32/win32k/objects/path.c b/reactos/subsystems/win32/win32k/objects/path.c index 801e8e598c8..f94c8d30087 100644 --- a/reactos/subsystems/win32/win32k/objects/path.c +++ b/reactos/subsystems/win32/win32k/objects/path.c @@ -2281,13 +2281,15 @@ NtGdiFillPath(HDC hDC) BOOL ret = FALSE; PPATH pPath; PDC_ATTR pdcattr; - PDC dc = DC_LockDc ( hDC ); + PDC dc; - if ( !dc ) + dc = DC_LockDc(hDC); + if (!dc) { EngSetLastError(ERROR_INVALID_PARAMETER); return FALSE; } + pPath = PATH_LockPath( dc->dclevel.hPath ); if (!pPath) {