From: Tony Crisci Date: Tue, 24 Mar 2015 10:00:26 +0000 (-0400) Subject: i3bar: check `short_text` for NULL on dump X-Git-Tag: 4.10.1~28^2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=refs%2Fpull%2F1574%2Fhead;p=i3%2Fi3 i3bar: check `short_text` for NULL on dump Check `short_text` for NULL on statusline dump, since this value can be NULL when not given. Fixes a segfault in that case. --- diff --git a/i3bar/src/child.c b/i3bar/src/child.c index a461c931..5347632a 100644 --- a/i3bar/src/child.c +++ b/i3bar/src/child.c @@ -286,7 +286,7 @@ static int stdin_end_array(void *context) { struct status_block *current; TAILQ_FOREACH(current, &statusline_head, blocks) { DLOG("full_text = %s\n", i3string_as_utf8(current->full_text)); - DLOG("short_text = %s\n", i3string_as_utf8(current->short_text)); + DLOG("short_text = %s\n", (current->short_text == NULL ? NULL : i3string_as_utf8(current->short_text))); DLOG("color = %s\n", current->color); } DLOG("end of dump\n");