die if no font could be loaded

This commit is contained in:
Markus Teich 2015-11-18 00:41:38 +01:00
parent c3cd2edca6
commit cc57a28eba

3
sent.c
View File

@ -616,7 +616,8 @@ void xloadfonts()
if (MAXFONTSTRLEN < snprintf(fstrs[j], MAXFONTSTRLEN, "%s:size=%d", fontfallbacks[j], FONTSZ(i))) if (MAXFONTSTRLEN < snprintf(fstrs[j], MAXFONTSTRLEN, "%s:size=%d", fontfallbacks[j], FONTSZ(i)))
die("font string too long"); 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++) for (j = 0; j < LEN(fontfallbacks); j++)