mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-21 07:55:10 +02:00
Properly handle all NULL cases
This commit is contained in:
@@ -269,9 +269,12 @@ line_as_ansi(Line *self, Py_UCS4 *buf, index_type buflen, bool *truncated, GPUCe
|
|||||||
|
|
||||||
GPUCell blank_cell = { 0 };
|
GPUCell blank_cell = { 0 };
|
||||||
GPUCell *cell, *temp_cell = &blank_cell;
|
GPUCell *cell, *temp_cell = &blank_cell;
|
||||||
if (prev_cell == NULL || *prev_cell == NULL) {
|
if (prev_cell == NULL) {
|
||||||
prev_cell = &temp_cell;
|
prev_cell = &temp_cell;
|
||||||
}
|
}
|
||||||
|
if (*prev_cell == NULL) {
|
||||||
|
*prev_cell = &blank_cell;
|
||||||
|
}
|
||||||
|
|
||||||
for (index_type pos=0; pos < limit; pos++) {
|
for (index_type pos=0; pos < limit; pos++) {
|
||||||
char_type ch = self->cpu_cells[pos].ch;
|
char_type ch = self->cpu_cells[pos].ch;
|
||||||
|
|||||||
Reference in New Issue
Block a user