From bfb8658bba32938dc883d42ab7bfa86217136325 Mon Sep 17 00:00:00 2001 From: Philippe Pepiot Date: Wed, 6 Jul 2011 13:32:33 +0200 Subject: [PATCH] Infobar: segfault when client->title is NULL, fixes #132 Signed-off-by: Philippe Pepiot --- src/infobar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/infobar.c b/src/infobar.c index b89f5a9..94fc804 100644 --- a/src/infobar.c +++ b/src/infobar.c @@ -188,7 +188,7 @@ infobar_draw_selbar(int sc) else if(sel && !infobar[sc].selbar->mapped) barwin_map(infobar[sc].selbar); - if(conf.selbar.maxlength >= 0 && sel) + if(conf.selbar.maxlength >= 0 && sel && sel->title) { str = xcalloc(conf.selbar.maxlength + 4, sizeof(char)); strncpy(str, sel->title, conf.selbar.maxlength);