Check for NULL dc surface before dereferencing it in IntGdiRealizePalette.

svn path=/trunk/; revision=56980
This commit is contained in:
Timo Kreuzer 2012-07-29 12:22:06 +00:00
parent 85a3397af9
commit 268d481877

View file

@ -767,6 +767,11 @@ IntGdiRealizePalette(HDC hDC)
return 0; return 0;
} }
if (!pdc->dclevel.pSurface)
{
goto cleanup;
}
ppalSurf = pdc->dclevel.pSurface->ppal; ppalSurf = pdc->dclevel.pSurface->ppal;
ppalDC = pdc->dclevel.ppal; ppalDC = pdc->dclevel.ppal;