From 15b1176841b2d44096ff42eef71812101652e15d Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Wed, 14 Nov 2018 22:32:33 -0500 Subject: [PATCH] Ensures no border output if space is not allocated. --- Components/9918/9918.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Components/9918/9918.cpp b/Components/9918/9918.cpp index 4419a77a5..6ddbb3c77 100644 --- a/Components/9918/9918.cpp +++ b/Components/9918/9918.cpp @@ -471,14 +471,18 @@ void Base::output_border(int cycles, uint32_t cram_dot) { if(cram_dot) { uint32_t *const pixel_target = reinterpret_cast(crt_.begin_data(1)); - *pixel_target = border_colour | cram_dot; + if(pixel_target) { + *pixel_target = border_colour | cram_dot; + } crt_.output_level(4); cycles -= 4; } if(cycles) { uint32_t *const pixel_target = reinterpret_cast(crt_.begin_data(1)); - *pixel_target = border_colour; + if(pixel_target) { + *pixel_target = border_colour; + } crt_.output_level(cycles); } }