mpr: Check for out of memory condition.

This commit is contained in:
Jeff Latimer 2007-09-21 23:08:22 +10:00 committed by Alexandre Julliard
parent 8d1a85914a
commit c04123fac9
1 changed files with 3 additions and 2 deletions

View File

@ -56,7 +56,8 @@ static LPSTR MPR_GetValueName( LPCSTR pbResource, WORD cbResource, BYTE nType )
DWORD i;
name = HeapAlloc( GetProcessHeap(), 0, 6+cbResource*2 );
if( name )
if( !name ) return NULL;
sprintf( name, "X-%02X-", nType );
for(i=0; i<cbResource; i++)
{