The Birdfont Source Code


All Repositories / birdfont.git / blobdiff – RSS feed

Fix memory leak

Changes made to libbirdfont/Renderer/FontCache.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/Renderer/FontCache.vala +++ libbirdfont/Renderer/FontCache.vala @@ -47,12 +47,12 @@ Font f; bool ok; + if (file_name == "") { + return fallback; + } + if (fonts.has_key (file_name)) { return fonts.get (file_name); - } - - if (file_name == "") { - return fallback; } f = new Font (); @@ -94,13 +94,10 @@ public CachedFont (Font? font) { this.font = font; cached++; - - warning (@"$cached cached fonts\n"); } ~CachedFont () { cached--; - warning (@"$cached cached fonts\n"); } public Glyph? get_glyph_by_name (string name) {