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.
This commit is contained in:
Tony Crisci 2015-03-24 05:45:20 -04:00
parent 822cd3bf1b
commit 0962c7f011
1 changed files with 3 additions and 1 deletions

View File

@ -265,6 +265,8 @@ static int stdin_end_map(void *context) {
}
i3string_set_markup(new_block->full_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);