mirror of
https://github.com/reactos/reactos.git
synced 2024-07-02 10:45:24 +00:00
Handle failed memory allocation
svn path=/trunk/; revision=42894
This commit is contained in:
parent
97d1a131cc
commit
2785ec2386
|
@ -395,6 +395,10 @@ GetTextFaceA( HDC hdc, INT count, LPSTR name )
|
||||||
|
|
||||||
res = GetTextFaceW(hdc, 0, NULL);
|
res = GetTextFaceW(hdc, 0, NULL);
|
||||||
nameW = HeapAlloc( GetProcessHeap(), 0, res * 2 );
|
nameW = HeapAlloc( GetProcessHeap(), 0, res * 2 );
|
||||||
|
if (nameW == NULL)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
GetTextFaceW( hdc, res, nameW );
|
GetTextFaceW( hdc, res, nameW );
|
||||||
|
|
||||||
if (name)
|
if (name)
|
||||||
|
|
Loading…
Reference in a new issue