From cd44d668d68209dd4e48eb63a7fcfe277d287160 Mon Sep 17 00:00:00 2001 From: Christoph Weiss Date: Sun, 24 Dec 2017 10:27:41 +0100 Subject: [PATCH] fix segmentation fault in font creation --- spectrwm.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/spectrwm.c b/spectrwm.c index 9b0ad2c..844445a 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -2927,11 +2927,13 @@ fontset_init(void) XFreeStringList(missing_charsets); - if (strcmp(default_string, "")) - warnx("Glyphs from those sets will be replaced " - "by '%s'.", default_string); - else - warnx("Glyphs from those sets won't be drawn."); + if(bar_fs && default_string) { + if (strcmp(default_string, "")) + warnx("Glyphs from those sets will be replaced " + "by '%s'.", default_string); + else + warnx("Glyphs from those sets won't be drawn."); + } } if (bar_fs == NULL)