die if no font could be loaded
authorMarkus Teich <markus.teich@stusta.mhn.de>
Tue, 17 Nov 2015 23:41:38 +0000 (00:41 +0100)
committerMarkus Teich <markus.teich@stusta.mhn.de>
Tue, 17 Nov 2015 23:41:38 +0000 (00:41 +0100)
sent.c

diff --git a/sent.c b/sent.c
index 4e2e810395509ac512596b6386c73e1c4e38e72d..e68051fc0adc772c42497c3cacc92132a8731a3a 100644 (file)
--- a/sent.c
+++ b/sent.c
@@ -616,7 +616,8 @@ void xloadfonts()
                        if (MAXFONTSTRLEN < snprintf(fstrs[j], MAXFONTSTRLEN, "%s:size=%d", fontfallbacks[j], FONTSZ(i)))
                                die("font string too long");
                }
-               fonts[i] = drw_fontset_create(d, (const char**)fstrs, LEN(fstrs));
+               if (!(fonts[i] = drw_fontset_create(d, (const char**)fstrs, LEN(fstrs))))
+                       die("unable to load any font for size %d", FONTSZ(i));
        }
 
        for (j = 0; j < LEN(fontfallbacks); j++)