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

Unified Diff: third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp

Issue 2177163003: Add null-check to ShapeResult::fallbackFonts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
index e05e7b13da28da65a3873b572c727bd5b5916c04..7849e7851e05d1a5ca9bc6a339f5259fe24ff462 100644
--- a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
+++ b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.cpp
@@ -215,7 +215,8 @@ void ShapeResult::fallbackFonts(HashSet<const SimpleFontData*>* fallback) const
ASSERT(fallback);
ASSERT(m_primaryFont);
for (unsigned i = 0; i < m_runs.size(); ++i) {
- if (m_runs[i] && m_runs[i]->m_fontData != m_primaryFont
+ if (m_runs[i] && m_runs[i]->m_fontData
+ && m_runs[i]->m_fontData != m_primaryFont
&& !m_runs[i]->m_fontData->isTextOrientationFallbackOf(m_primaryFont.get())) {
fallback->add(m_runs[i]->m_fontData.get());
}
« 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