usp10: Check heap_alloc return value (Coverity).

This commit is contained in:
Marcus Meissner 2010-05-21 21:11:30 +02:00 committed by Alexandre Julliard
parent ff2813364a
commit 163c7021b1
1 changed files with 1 additions and 0 deletions

View File

@ -1378,6 +1378,7 @@ HRESULT WINAPI ScriptShape(HDC hdc, SCRIPT_CACHE *psc, const WCHAR *pwcChars,
if ((get_cache_pitch_family(psc) & TMPF_TRUETYPE) && !psa->fNoGlyphIndex)
{
WCHAR *rChars = heap_alloc(sizeof(WCHAR) * cChars);
if (!rChars) return E_OUTOFMEMORY;
for (i = 0; i < cChars; i++)
{
int idx = i;