diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-03-14 15:27:34 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-04-13 12:00:30 -0400 |
commit | 35e798c3a71573d2204c8e21a28e0a4b882c54cb (patch) | |
tree | bee5c7a75389db24ade4fef20f40647856016e05 /src | |
parent | 69d019f3bdc7aebbda87cecb0d31913bedf6a87c (diff) | |
download | rneovim-35e798c3a71573d2204c8e21a28e0a4b882c54cb.tar.gz rneovim-35e798c3a71573d2204c8e21a28e0a4b882c54cb.tar.bz2 rneovim-35e798c3a71573d2204c8e21a28e0a4b882c54cb.zip |
pvs/v595: check if extmark not NULL
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/extmark.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/extmark.c b/src/nvim/extmark.c index e77b556024..38d111f2aa 100644 --- a/src/nvim/extmark.c +++ b/src/nvim/extmark.c @@ -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; } } |