Merge pull request #1574 from acrisci/bug/bar-text-null-check
i3bar: check block text for NULL
This commit is contained in:
commit
c0a0b99d86
|
@ -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->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);
|
TAILQ_INSERT_TAIL(&statusline_buffer, new_block, blocks);
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -284,7 +286,7 @@ static int stdin_end_array(void *context) {
|
||||||
struct status_block *current;
|
struct status_block *current;
|
||||||
TAILQ_FOREACH(current, &statusline_head, blocks) {
|
TAILQ_FOREACH(current, &statusline_head, blocks) {
|
||||||
DLOG("full_text = %s\n", i3string_as_utf8(current->full_text));
|
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("color = %s\n", current->color);
|
||||||
}
|
}
|
||||||
DLOG("end of dump\n");
|
DLOG("end of dump\n");
|
||||||
|
|
Loading…
Reference in New Issue