From: Mikko Rasa Date: Sat, 14 Apr 2018 13:28:50 +0000 (+0300) Subject: Don't crash if no glyphs were found X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=f80db26b7c5db7c120f5b38defa15fed232f6e96;p=ttf2png.git Don't crash if no glyphs were found --- diff --git a/ttf2png.c b/ttf2png.c index 15b554d..7cd9455 100644 --- a/ttf2png.c +++ b/ttf2png.c @@ -210,6 +210,12 @@ int main(int argc, char **argv) if(err) return 1; + if(!font.n_glyphs) + { + fprintf(stderr, "No glyphs found in the requested range\n"); + return 1; + } + if(pack) err = render_packed(&font, margin, padding); else