[WIN32K] Add some validity checks in PDEVOBJ_vReference() and use it instead of expli...
[reactos.git] / win32ss / gdi / ntgdi / dclife.c
index 99d872a..52236c0 100644 (file)
@@ -836,7 +836,7 @@ GreCreateCompatibleDC(HDC hdc, BOOL bAltDc)
 
         /* Get the pdev from the DC */
         ppdev = pdc->ppdev;
-        InterlockedIncrement(&ppdev->cPdevRefs);
+        PDEVOBJ_vReference(ppdev);
 
         /* Unlock the source DC */
         DC_UnlockDc(pdc);