From: Tony Crisci Date: Tue, 24 Mar 2015 09:45:20 +0000 (-0400) Subject: i3bar: check block text for NULL X-Git-Tag: 4.10.1~28^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0962c7f011b0e8e68eae23ae1842989b39b41603;p=i3%2Fi3 i3bar: check block text for NULL Add a null check to `full_text` and `short_text` for a block before setting the markup property to avoid a segfault. --- diff --git a/i3bar/src/child.c b/i3bar/src/child.c index 402e6351..a461c931 100644 --- a/i3bar/src/child.c +++ b/i3bar/src/child.c @@ -265,7 +265,9 @@ static int stdin_end_map(void *context) { } i3string_set_markup(new_block->full_text, new_block->is_markup); - i3string_set_markup(new_block->short_text, new_block->is_markup); + + if (new_block->short_text != NULL) + i3string_set_markup(new_block->short_text, new_block->is_markup); TAILQ_INSERT_TAIL(&statusline_buffer, new_block, blocks); return 1;