[WIN32SS] Fix crash if releasing a PDEVOBJ before switching to graphic mode

- do not try to remove ppdev from gppdevList if gppdevList is NULL
- do not check (and maybe change) gpmdev, as it should be done only in MDEVOBJ_vDestroy
This commit is contained in:
Hervé Poussineau 2022-04-24 17:27:55 +02:00
parent 0b0e73d66e
commit cb504d7b0c

View file

@ -139,7 +139,7 @@ PDEVOBJ_vRelease(
{
gppdevList = ppdev->ppdevNext;
}
else
else if (gppdevList)
{
PPDEVOBJ ppdevCurrent = gppdevList;
BOOL found = FALSE;
@ -154,10 +154,6 @@ PDEVOBJ_vRelease(
ppdevCurrent->ppdevNext = ppdev->ppdevNext;
}
/* Is this the primary one ? */
if (ppdev == gpmdev->ppdevGlobal)
gpmdev->ppdevGlobal = NULL;
/* Unload display driver */
EngUnloadImage(ppdev->pldev);