diff options
author | kraxel <kraxel> | 2004-06-15 20:19:59 +0000 |
---|---|---|
committer | kraxel <kraxel> | 2004-06-15 20:19:59 +0000 |
commit | b6a435badc8d2cd793a7605e43d2787841b2bf75 (patch) | |
tree | 0b9bbb0bb2d9da765cadc0bd8e333fc86ce29c63 /fbi.c | |
parent | 786cf865080ac907b75fbe74ead290fff9efb718 (diff) | |
download | fbida-b6a435badc8d2cd793a7605e43d2787841b2bf75.tar.gz |
- fix segfault on font open failure.
Diffstat (limited to 'fbi.c')
-rw-r--r-- | fbi.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1167,7 +1167,13 @@ main(int argc, char *argv[]) need_read = 1; font_init(); - face = font_open(fontname ? fontname : "monospace:size=16"); + if (NULL == fontname) + fontname = "monospace:size=16"; + face = font_open(fontname); + if (NULL == face) { + fprintf(stderr,"can't open font: %s\n",fontname); + exit(1); + } fd = fb_init(cfg_get_str(O_DEVICE), cfg_get_str(O_VIDEO_MODE), GET_VT()); |