mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-30 04:50:08 +00:00
Ensures no writes to pixel_pointer_
when allocation has failed.
This commit is contained in:
parent
028e530232
commit
ccb52fb625
@ -394,7 +394,6 @@ template <class BusHandler, bool is_iie> class Video: public VideoBase {
|
||||
static_cast<size_t>(fetch_end - column_),
|
||||
&base_stream_[static_cast<size_t>(column_)],
|
||||
&auxiliary_stream_[static_cast<size_t>(column_)]);
|
||||
// TODO: should character modes be mapped to character pixel outputs here?
|
||||
}
|
||||
|
||||
if(row_ < 192) {
|
||||
@ -413,7 +412,7 @@ template <class BusHandler, bool is_iie> class Video: public VideoBase {
|
||||
const int pixel_row = row_ & 7;
|
||||
|
||||
const bool is_double = Video::is_double_mode(line_mode);
|
||||
if(!is_double && was_double_) {
|
||||
if(!is_double && was_double_ && pixel_pointer_) {
|
||||
pixel_pointer_[pixel_start*14 + 0] =
|
||||
pixel_pointer_[pixel_start*14 + 1] =
|
||||
pixel_pointer_[pixel_start*14 + 2] =
|
||||
@ -424,6 +423,7 @@ template <class BusHandler, bool is_iie> class Video: public VideoBase {
|
||||
}
|
||||
was_double_ = is_double;
|
||||
|
||||
if(pixel_pointer_) {
|
||||
switch(line_mode) {
|
||||
case GraphicsMode::Text:
|
||||
output_text(
|
||||
@ -487,8 +487,10 @@ template <class BusHandler, bool is_iie> class Video: public VideoBase {
|
||||
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
if(pixel_end == 40) {
|
||||
if(pixel_pointer_) {
|
||||
if(was_double_) {
|
||||
pixel_pointer_[560] = pixel_pointer_[561] = pixel_pointer_[562] = pixel_pointer_[563] =
|
||||
pixel_pointer_[564] = pixel_pointer_[565] = pixel_pointer_[566] = pixel_pointer_[567] = 0;
|
||||
@ -498,6 +500,7 @@ template <class BusHandler, bool is_iie> class Video: public VideoBase {
|
||||
else
|
||||
pixel_pointer_[567] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
crt_.output_data(568, 568);
|
||||
pixel_pointer_ = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user