From 43ae328658518a4ee1b3bf363f8865234c64a674 Mon Sep 17 00:00:00 2001 From: Mark Tiefenbruck Date: Tue, 6 Jul 2021 16:19:56 -0700 Subject: [PATCH] Patch from Denis Gantsev Fluxbox would segfault when no fonts were available. Now it just exits with an error. --- src/FbTk/Font.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/FbTk/Font.cc b/src/FbTk/Font.cc index 0164e774..efa6cfbd 100644 --- a/src/FbTk/Font.cc +++ b/src/FbTk/Font.cc @@ -43,6 +43,7 @@ #include #include #include +#include #ifdef HAVE_SETLOCALE #include @@ -231,6 +232,9 @@ bool Font::load(const string &name) { m_fontstr = name; resetEffects(*this); return true; + } else { + std::cerr << "Couldn't initialize fonts. Check your fontconfig installation.\n"; + exit(1); } delete tmp_font;