summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2020-01-26 19:59:51 (GMT)
committerfvogel <fvogelnew1@free.fr>2020-01-26 19:59:51 (GMT)
commit83af221226d261993f3d06303f3f92432f1368e5 (patch)
tree836302edd82148e67e36f4f0f09202c3e60ab3e3
parenta1b91c37b11901f477e0ea0bbffd983578008363 (diff)
downloadtk-83af221226d261993f3d06303f3f92432f1368e5.zip
tk-83af221226d261993f3d06303f3f92432f1368e5.tar.gz
tk-83af221226d261993f3d06303f3f92432f1368e5.tar.bz2
Fix [90a4b7581f]: Tk fontconfig crash if there is no font installed
-rw-r--r--unix/tkUnixRFont.c2
1 files changed, 1 insertions, 1 deletions
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;
}