Free the surface instead of unlocking it

svn path=/branches/reactos-yarotows/; revision=46573
This commit is contained in:
Jérôme Gardou 2010-03-29 19:50:49 +00:00
parent 2bfb2d80b4
commit 6b19e6defc

View file

@ -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);
}