termiointernals: fix possible NULL-dereference CID1399745

This commit is contained in:
Boris Faure 2019-03-18 22:56:49 +01:00
parent 6c55ecf1a1
commit 8076e4673f
1 changed files with 1 additions and 1 deletions

View File

@ -253,7 +253,7 @@ _sel_codepoints_get(const Termio *sd,
/* Selection outside of current line of "text" */
TRY(_codepoint_buf_append(buf, ' '));
}
else if (cells[x].codepoint == 0)
else if (!cells || cells[x].codepoint == 0)
{
TRY(_codepoint_buf_append(buf, ' '));
}