mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +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 */
|
||||
hsurf = ppdev->pldev->pfn.EnableSurface(ppdev->dhpdev);
|
||||
if (hsurf== NULL)
|
||||
{
|
||||
DPRINT1("Failed to create PDEV surface!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Get a reference to the surface */
|
||||
ppdev->pSurface = SURFACE_ShareLockSurface(hsurf);
|
||||
NT_ASSERT(ppdev->pSurface != NULL);
|
||||
}
|
||||
|
||||
/* Increment reference count */
|
||||
|
@ -469,7 +475,7 @@ PDEVOBJ_bSwitchMode(
|
|||
pSurface = PDEVOBJ_pSurface(ppdevTmp);
|
||||
if (!pSurface)
|
||||
{
|
||||
DPRINT1("DrvEnableSurface failed\n");
|
||||
DPRINT1("PDEVOBJ_pSurface failed\n");
|
||||
goto leave;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue