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

Unified Diff: chrome/browser/android/vr_shell/textures/ui_texture.cc

Issue 2836013004: VR: Fix crash when fallback font is missing (Closed)
Patch Set: Created 3 years, 8 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: chrome/browser/android/vr_shell/textures/ui_texture.cc
diff --git a/chrome/browser/android/vr_shell/textures/ui_texture.cc b/chrome/browser/android/vr_shell/textures/ui_texture.cc
index 36cab83305e983ae31bb12f71fad40df5287a19d..d07b2b60f44483433956716c8c03bc753551bad7 100644
--- a/chrome/browser/android/vr_shell/textures/ui_texture.cc
+++ b/chrome/browser/android/vr_shell/textures/ui_texture.cc
@@ -55,6 +55,8 @@ gfx::FontList UiTexture::GetFontList(int size, base::string16 text) {
sk_sp<SkTypeface> tf(font_mgr->matchFamilyStyleCharacter(
default_font.GetFontName().c_str(), SkFontStyle(), nullptr, 0,
it.get()));
+ if (!tf)
+ continue;
cjgrant 2017/04/25 16:40:06 If we hit this, does it mean that some characters
mthiesse 2017/04/25 16:47:59 Yes, I'll add a TODO to address this when we move
SkString sk_name;
tf->getFamilyName(&sk_name);
std::string name(sk_name.c_str());
« 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