Handle failed memory allocation

svn path=/trunk/; revision=42894
This commit is contained in:
Gregor Schneider 2009-08-23 23:03:55 +00:00
parent 97d1a131cc
commit 2785ec2386

View file

@ -395,6 +395,10 @@ GetTextFaceA( HDC hdc, INT count, LPSTR name )
res = GetTextFaceW(hdc, 0, NULL);
nameW = HeapAlloc( GetProcessHeap(), 0, res * 2 );
if (nameW == NULL)
{
return 0;
}
GetTextFaceW( hdc, res, nameW );
if (name)