mpr: Check for out of memory condition.
This commit is contained in:
parent
8d1a85914a
commit
c04123fac9
|
@ -56,8 +56,9 @@ static LPSTR MPR_GetValueName( LPCSTR pbResource, WORD cbResource, BYTE nType )
|
|||
DWORD i;
|
||||
|
||||
name = HeapAlloc( GetProcessHeap(), 0, 6+cbResource*2 );
|
||||
if( name )
|
||||
sprintf( name, "X-%02X-", nType );
|
||||
if( !name ) return NULL;
|
||||
|
||||
sprintf( name, "X-%02X-", nType );
|
||||
for(i=0; i<cbResource; i++)
|
||||
{
|
||||
name[5+i*2]=hex((pbResource[i]&0xf0)>>4);
|
||||
|
|
Loading…
Reference in New Issue