From 83af221226d261993f3d06303f3f92432f1368e5 Mon Sep 17 00:00:00 2001 From: fvogel Date: Sun, 26 Jan 2020 19:59:51 +0000 Subject: Fix [90a4b7581f]: Tk fontconfig crash if there is no font installed --- unix/tkUnixRFont.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/tkUnixRFont.c b/unix/tkUnixRFont.c index f2bef2b..cfb7123 100644 --- a/unix/tkUnixRFont.c +++ b/unix/tkUnixRFont.c @@ -279,7 +279,7 @@ InitFont( */ set = FcFontSort(0, pattern, FcTrue, NULL, &result); - if (!set) { + if (!set || set->nfont == 0) { ckfree(fontPtr); return NULL; } -- cgit v0.12