The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Fix crash on pasting an empty set in overview

These changes was commited to the Birdfont repository Wed, 24 Jun 2015 21:33:37 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Wed, 24 Jun 2015 21:33:37 +0000 (23:33 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Wed, 24 Jun 2015 21:33:37 +0000 (23:33 +0200)
commit fff9e42b0ecc767acab5230a30216f66194b8d9d
tree 85dc860dbd6c9c2a8f770abbfa89b7d27dc6ee1a
parent 825a31978769bc96642170465c8a032bb094ead1
Fix crash on pasting an empty set in overview

libbirdfont/OverView.vala
libbirdfont/Renderer/Text.vala
--- a/libbirdfont/OverView.vala +++ b/libbirdfont/OverView.vala @@ -1433,6 +1433,11 @@ return; } + if (copied_glyphs.size < i) { + warning ("Array index out of bounds."); + return; + } + i = 0; foreach (GlyphCollection g in glyps) { glyph = copied_glyphs.get (i).get_current ().copy ();
--- a/libbirdfont/Renderer/Text.vala +++ b/libbirdfont/Renderer/Text.vala @@ -345,8 +345,7 @@ if (unlikely (cached_font.base_line != 0)) { warning ("Base line not zero."); } - - // FIXME: cache is disabled for retina testing + if (use_cached_glyphs) { iterate ((glyph, kerning, last) => { double end;