loader: term_image_display() should test screen_buffer

Make sure screen_buffer is not NULL.
This commit is contained in:
Toomas Soome 2021-01-10 21:56:34 +02:00
parent a013e285df
commit 89632acb50
2 changed files with 6 additions and 0 deletions

View File

@ -147,6 +147,9 @@ term_image_display(teken_gfx_t *state, const teken_rect_t *r)
teken_pos_t p;
int idx;
if (screen_buffer == NULL)
return;
for (p.tp_row = r->tr_begin.tp_row;
p.tp_row < r->tr_end.tp_row; p.tp_row++) {
for (p.tp_col = r->tr_begin.tp_col;

View File

@ -109,6 +109,9 @@ term_image_display(teken_gfx_t *state, const teken_rect_t *r)
teken_pos_t p;
int idx;
if (screen_buffer == NULL)
return;
for (p.tp_row = r->tr_begin.tp_row;
p.tp_row < r->tr_end.tp_row; p.tp_row++) {
for (p.tp_col = r->tr_begin.tp_col;