mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
servo: text: Don't crash on kerning/ligatures
Source-Repo: https://github.com/servo/servo Source-Revision: 4fd486970b57de23b5fc5767576f2d2db2e1bd6b
This commit is contained in:
parent
81acf17a77
commit
2cc36bc57c
@ -329,7 +329,14 @@ impl DetailedGlyphStore {
|
||||
fn get_detailed_glyphs_for_entry(&self, entry_offset: uint, count: u16) -> &[DetailedGlyph] {
|
||||
debug!("Requesting detailed glyphs[n=%u] for entry[off=%u]", count as uint, entry_offset);
|
||||
|
||||
assert count > 0;
|
||||
// FIXME: Is this right? --pcwalton
|
||||
if count == 0 {
|
||||
let result = do self.detail_buffer.borrow |glyphs: &[DetailedGlyph]| {
|
||||
vec::view(glyphs, 0, 0)
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
||||
assert (count as uint) <= self.detail_buffer.len();
|
||||
self.ensure_sorted();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user