Module: wine Branch: master Commit: a6a7bceb1ad48316db7fb59dd4d4ee63c67fbcab URL: http://source.winehq.org/git/wine.git/?a=commit;h=a6a7bceb1ad48316db7fb59dd4...
Author: André Hentschel nerv@dawncrow.de Date: Wed Jul 13 20:46:42 2011 +0200
usp10: Fix possible crashes (clang).
---
dlls/usp10/usp10.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index afc4e72..50de8bf 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -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;