From 6b19e6defc9f5c58d641689ec8f527a4f9931ff9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Mon, 29 Mar 2010 19:50:49 +0000 Subject: [PATCH] [WIN32K] Free the surface instead of unlocking it svn path=/branches/reactos-yarotows/; revision=46573 --- subsystems/win32/win32k/eng/pdevobj.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subsystems/win32/win32k/eng/pdevobj.c b/subsystems/win32/win32k/eng/pdevobj.c index a49110a966a..b7b66473b48 100644 --- a/subsystems/win32/win32k/eng/pdevobj.c +++ b/subsystems/win32/win32k/eng/pdevobj.c @@ -52,13 +52,15 @@ PDEVOBJ_vRelease(PPDEVOBJ ppdev) /* Decrease reference count */ --ppdev->cPdevRefs; + ASSERT(ppdev->cPdevRefs >= 0) ; + /* Check if references are left */ if (ppdev->cPdevRefs == 0) { /* Release surface */ if(ppdev->pSurface) { - SURFACE_ShareUnlockSurface(ppdev->pSurface); + SURFACE_FreeSurface(ppdev->pSurface); ppdev->pfn.DisableSurface(ppdev->dhpdev); } -- 2.17.1