From 89632acb50f1a0bcc6ce82b9921f779cafaa9468 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Sun, 10 Jan 2021 21:56:34 +0200 Subject: [PATCH] loader: term_image_display() should test screen_buffer Make sure screen_buffer is not NULL. --- stand/efi/libefi/efi_console.c | 3 +++ stand/i386/libi386/vidconsole.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/stand/efi/libefi/efi_console.c b/stand/efi/libefi/efi_console.c index 22adcd3a00e..6782cf5696a 100644 --- a/stand/efi/libefi/efi_console.c +++ b/stand/efi/libefi/efi_console.c @@ -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; diff --git a/stand/i386/libi386/vidconsole.c b/stand/i386/libi386/vidconsole.c index 47150b3dd09..b42a476ef85 100644 --- a/stand/i386/libi386/vidconsole.c +++ b/stand/i386/libi386/vidconsole.c @@ -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; -- 2.45.0