From 7d82873478fc932327b3b25e76c4eb3eb6dfeb46 Mon Sep 17 00:00:00 2001 From: Dagen Brock Date: Fri, 27 Jul 2018 14:06:33 -0500 Subject: [PATCH] add check for missing fonts --- src/xdriver.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/xdriver.c b/src/xdriver.c index 1e83fa5..c2bd3fe 100644 --- a/src/xdriver.c +++ b/src/xdriver.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #ifdef X_SHARED_MEM @@ -596,6 +597,10 @@ dev_video_init() } fflush(stdout); g_text_FontSt = XLoadQueryFont(g_display, FONT_NAME_STATUS); + if (g_text_FontSt == NULL) { + glog("Could not load font, possibly missing xorg-x11-fonts-misc"); + exit(1); + } vid_printf("font # returned: %08x\n", (word32)(g_text_FontSt->fid)); font_height = g_text_FontSt->ascent + g_text_FontSt->descent; vid_printf("font_height: %d\n", font_height);