mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 23:02:59 +00:00
[WIN32K]
Gracefully handle failure in DrvEnableSurface. patch by Timo Kreuzer svn path=/trunk/; revision=66851
This commit is contained in:
parent
7bab2c0560
commit
4a5a775bf6
1 changed files with 7 additions and 1 deletions
|
@ -217,9 +217,15 @@ PDEVOBJ_pSurface(
|
||||||
{
|
{
|
||||||
/* Call the drivers DrvEnableSurface */
|
/* Call the drivers DrvEnableSurface */
|
||||||
hsurf = ppdev->pldev->pfn.EnableSurface(ppdev->dhpdev);
|
hsurf = ppdev->pldev->pfn.EnableSurface(ppdev->dhpdev);
|
||||||
|
if (hsurf== NULL)
|
||||||
|
{
|
||||||
|
DPRINT1("Failed to create PDEV surface!");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/* Get a reference to the surface */
|
/* Get a reference to the surface */
|
||||||
ppdev->pSurface = SURFACE_ShareLockSurface(hsurf);
|
ppdev->pSurface = SURFACE_ShareLockSurface(hsurf);
|
||||||
|
NT_ASSERT(ppdev->pSurface != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Increment reference count */
|
/* Increment reference count */
|
||||||
|
@ -469,7 +475,7 @@ PDEVOBJ_bSwitchMode(
|
||||||
pSurface = PDEVOBJ_pSurface(ppdevTmp);
|
pSurface = PDEVOBJ_pSurface(ppdevTmp);
|
||||||
if (!pSurface)
|
if (!pSurface)
|
||||||
{
|
{
|
||||||
DPRINT1("DrvEnableSurface failed\n");
|
DPRINT1("PDEVOBJ_pSurface failed\n");
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue