usp10: Fix possible crashes (clang).

This commit is contained in:
André Hentschel 2011-07-13 20:46:42 +02:00 committed by Alexandre Julliard
parent 89beac4719
commit a6a7bceb1a
1 changed files with 2 additions and 2 deletions

View File

@ -1612,7 +1612,7 @@ HRESULT WINAPI ScriptShapeOpenType( HDC hdc, SCRIPT_CACHE *psc,
if (cRanges)
FIXME("Ranges not supported yet\n");
rtl = (!psa->fLogicalOrder && psa->fRTL);
rtl = (psa && !psa->fLogicalOrder && psa->fRTL);
*pcGlyphs = cChars;
if ((hr = init_script_cache(hdc, psc)) != S_OK) return hr;
@ -1640,7 +1640,7 @@ HRESULT WINAPI ScriptShapeOpenType( HDC hdc, SCRIPT_CACHE *psc,
pwLogClust[i] = idx;
}
if (!psa->fNoGlyphIndex)
if (psa && !psa->fNoGlyphIndex)
{
WCHAR *rChars;
if ((hr = SHAPE_CheckFontForRequiredFeatures(hdc, (ScriptCache *)*psc, psa)) != S_OK) return hr;