Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Unified Diff: Source/platform/fonts/harfbuzz/HarfBuzzFaceCoreText.cpp

Issue 606783002: Avoid null cgFont crash in harfBuzzCoreTextGetTable (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/harfbuzz/HarfBuzzFaceCoreText.cpp
diff --git a/Source/platform/fonts/harfbuzz/HarfBuzzFaceCoreText.cpp b/Source/platform/fonts/harfbuzz/HarfBuzzFaceCoreText.cpp
index 1fc421565b0f706855be788a493cfde0c429ae2c..44257c8f4bbc816fbf45f3f09a9adec9786b8115 100644
--- a/Source/platform/fonts/harfbuzz/HarfBuzzFaceCoreText.cpp
+++ b/Source/platform/fonts/harfbuzz/HarfBuzzFaceCoreText.cpp
@@ -109,6 +109,8 @@ static void releaseTableData(void* userData)
static hb_blob_t* harfBuzzCoreTextGetTable(hb_face_t* face, hb_tag_t tag, void* userData)
{
CGFontRef cgFont = reinterpret_cast<CGFontRef>(userData);
+ if (!cgFont)
+ return 0;
CFDataRef cfData = CGFontCopyTableForTag(cgFont, tag);
if (!cfData)
return 0;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698