aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/platform/macos/font.rs
diff options
context:
space:
mode:
authorDominik Boehi <dominik.boehi@gmail.com>2017-04-12 20:36:20 +0200
committerDominik Boehi <dominik.boehi@gmail.com>2017-04-12 20:36:27 +0200
commitecab3cd7961d122f122f4dd97d251ead00cea924 (patch)
tree86f6d464e72b03dfb76a507637f1518a618729a0 /components/gfx/platform/macos/font.rs
parenteb058e20a91b1646d0ac1176d4084b14b7c02fc2 (diff)
downloadservo-ecab3cd7961d122f122f4dd97d251ead00cea924.tar.gz
servo-ecab3cd7961d122f122f4dd97d251ead00cea924.zip
Fix panic when font face name is not available
Diffstat (limited to 'components/gfx/platform/macos/font.rs')
-rw-r--r--components/gfx/platform/macos/font.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/gfx/platform/macos/font.rs b/components/gfx/platform/macos/font.rs
index 8fb867a2f5c..d87fec6f36d 100644
--- a/components/gfx/platform/macos/font.rs
+++ b/components/gfx/platform/macos/font.rs
@@ -202,8 +202,8 @@ impl FontHandleMethods for FontHandle {
self.ctfont.family_name()
}
- fn face_name(&self) -> String {
- self.ctfont.face_name()
+ fn face_name(&self) -> Option<String> {
+ Some(self.ctfont.face_name())
}
fn is_italic(&self) -> bool {