diff --git a/reactos/subsystems/win32/win32k/objects/dclife.c b/reactos/subsystems/win32/win32k/objects/dclife.c index 8e7e223900d..0dffdd41193 100644 --- a/reactos/subsystems/win32/win32k/objects/dclife.c +++ b/reactos/subsystems/win32/win32k/objects/dclife.c @@ -49,18 +49,6 @@ DC_AllocDC(PUNICODE_STRING Driver) hDC = NewDC->BaseObject.hHmgr; - /* Allocate a Vis region */ - NewDC->prgnVis = IntSysCreateRectpRgn(0, 0, 1, 1); - if (!NewDC->prgnVis) - { - DPRINT1("IntSysCreateRectpRgn failed\n"); - if (!GDIOBJ_FreeObjByHandle(hDC, GDI_OBJECT_TYPE_DC)) - { - ASSERT(FALSE); - } - return NULL; - } - NewDC->pdcattr = &NewDC->dcattr; DC_AllocateDcAttr(hDC); @@ -146,6 +134,18 @@ DC_AllocDC(PUNICODE_STRING Driver) hsurf = (HBITMAP)PrimarySurface.pSurface; // <- what kind of haxx0ry is that? NewDC->dclevel.pSurface = SURFACE_ShareLockSurface(hsurf); + /* Allocate a Vis region */ + NewDC->prgnVis = IntSysCreateRectpRgn(0, 0, 1, 1); + if (!NewDC->prgnVis) + { + DPRINT1("IntSysCreateRectpRgn failed\n"); + if (!GDIOBJ_FreeObjByHandle(hDC, GDI_OBJECT_TYPE_DC)) + { + ASSERT(FALSE); + } + return NULL; + } + return NewDC; }