aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Tiefenbruck <mark@fluxbox.org>2021-07-06 23:19:56 (GMT)
committerMark Tiefenbruck <mark@fluxbox.org>2021-07-06 23:19:56 (GMT)
commit43ae328658518a4ee1b3bf363f8865234c64a674 (patch)
treeeebae9ac45d88dda02738dad624b46aedea9fc89 /src
parentee9c0a34baadbae98c510b1bf1b8c720a33c6f56 (diff)
downloadfluxbox-43ae328658518a4ee1b3bf363f8865234c64a674.zip
fluxbox-43ae328658518a4ee1b3bf363f8865234c64a674.tar.bz2
Patch from Denis Gantsev
Fluxbox would segfault when no fonts were available. Now it just exits with an error.
Diffstat (limited to 'src')
-rw-r--r--src/FbTk/Font.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/FbTk/Font.cc b/src/FbTk/Font.cc
index 0164e77..efa6cfb 100644
--- a/src/FbTk/Font.cc
+++ b/src/FbTk/Font.cc
@@ -43,6 +43,7 @@
43#include <map> 43#include <map>
44#include <typeinfo> 44#include <typeinfo>
45#include <langinfo.h> 45#include <langinfo.h>
46#include <iostream>
46 47
47#ifdef HAVE_SETLOCALE 48#ifdef HAVE_SETLOCALE
48#include <locale.h> 49#include <locale.h>
@@ -231,6 +232,9 @@ bool Font::load(const string &name) {
231 m_fontstr = name; 232 m_fontstr = name;
232 resetEffects(*this); 233 resetEffects(*this);
233 return true; 234 return true;
235 } else {
236 std::cerr << "Couldn't initialize fonts. Check your fontconfig installation.\n";
237 exit(1);
234 } 238 }
235 239
236 delete tmp_font; 240 delete tmp_font;