The Birdfont Source Code


All Repositories / birdfont.git / blobdiff – RSS feed

Fix memory leak

Changes made to libbirdfont/BirdFontPart.vala

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
--- libbirdfont/BirdFontPart.vala +++ libbirdfont/BirdFontPart.vala @@ -30,6 +30,11 @@ public BirdFontPart (Font font) { this.font = font; + + font.font_deleted.connect (() => { + this.font = Font.empty; + }); + parts = new Gee.ArrayList<string> (); root_directory = ""; } @@ -154,7 +159,7 @@ bf.write_closing_root_tag (os); os.close (); - foreach (Glyph g in gc.get_version_list ().glyphs) { + foreach (Glyph g in gc.glyphs) { try { write_glyph (bf, gc, g); write_glyph_background_image (bf, gc, g);