Make font template data load fallible. Fixes #12037.

This commit is contained in:
Josh Matthews 2016-07-01 11:26:32 -04:00
parent 0ae07e07e6
commit fb943ab54b
4 changed files with 29 additions and 25 deletions

View file

@ -95,8 +95,9 @@ impl FontTemplates {
}
}
let template = FontTemplate::new(identifier, maybe_data);
self.templates.push(template);
if let Ok(template) = FontTemplate::new(identifier, maybe_data) {
self.templates.push(template);
}
}
}