pvs/v595: check if extmark not NULL

This commit is contained in:
Jan Edmund Lazo 2020-03-14 15:27:34 -04:00
parent 69d019f3bd
commit 35e798c3a7
No known key found for this signature in database
GPG Key ID: 64915E6E9F735B15

View File

@ -789,7 +789,7 @@ bool decorations_redraw_start(buf_T *buf, int top_row,
ExtmarkItem *item = map_ref(uint64_t, ExtmarkItem)(buf->b_extmark_index,
start_id, false);
if ((!(mark.id&MARKTREE_END_FLAG) && altpos.row < top_row
&& !kv_size(item->virt_text))
&& item && !kv_size(item->virt_text))
|| ((mark.id&MARKTREE_END_FLAG) && altpos.row >= top_row)) {
goto next_mark;
}
@ -854,7 +854,7 @@ int decorations_redraw_col(buf_T *buf, int col, DecorationRedrawState *state)
if (endpos.row < mark.row
|| (endpos.row == mark.row && endpos.col <= mark.col)) {
if (!kv_size(item->virt_text)) {
if (item && !kv_size(item->virt_text)) {
goto next_mark;
}
}