зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1408078 - Add missing null-checks in MacOSFontEntry::SupportsOpenTypeFeature. r=jrmuizel
This commit is contained in:
Родитель
ed36a3172e
Коммит
0028134967
|
@ -692,10 +692,14 @@ MacOSFontEntry::SupportsOpenTypeFeature(Script aScript, uint32_t aFeatureTag)
|
|||
mHasAATSmallCapsInitialized = true;
|
||||
CTFontRef ctFont =
|
||||
CTFontCreateWithGraphicsFont(mFontRef, 0.0, nullptr, nullptr);
|
||||
CFArrayRef features = CTFontCopyFeatures(ctFont);
|
||||
CFRelease(ctFont);
|
||||
mHasAATSmallCaps = CheckForAATSmallCaps(features);
|
||||
CFRelease(features);
|
||||
if (ctFont) {
|
||||
CFArrayRef features = CTFontCopyFeatures(ctFont);
|
||||
CFRelease(ctFont);
|
||||
if (features) {
|
||||
mHasAATSmallCaps = CheckForAATSmallCaps(features);
|
||||
CFRelease(features);
|
||||
}
|
||||
}
|
||||
return mHasAATSmallCaps;
|
||||
}
|
||||
return gfxFontEntry::SupportsOpenTypeFeature(aScript, aFeatureTag);
|
||||
|
|
Загрузка…
Ссылка в новой задаче