From dd67bf979767f11557852fb4e3522adbb915a623 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 17 Jul 2020 00:22:59 -0700 Subject: [PATCH] GBA Video: Fix another merge casualty --- src/gba/renderers/software-mode0.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gba/renderers/software-mode0.c b/src/gba/renderers/software-mode0.c index b41970b26..b41be2476 100644 --- a/src/gba/renderers/software-mode0.c +++ b/src/gba/renderers/software-mode0.c @@ -14,7 +14,11 @@ } \ screenBase = background->screenBase + yBase + (xBase >> 2); \ uint16_t* screenBlock = renderer->d.vramBG[screenBase >> VRAM_BLOCK_OFFSET]; \ - LOAD_16(mapData, screenBase & VRAM_BLOCK_MASK, screenBlock); \ + if (LIKELY(screenBlock)) { \ + LOAD_16(mapData, screenBase & VRAM_BLOCK_MASK, screenBlock); \ + } else { \ + mapData = 0; \ + } #define DRAW_BACKGROUND_MODE_0_TILE_SUFFIX_16(BLEND, OBJWIN) \ paletteData = GBA_TEXT_MAP_PALETTE(mapData) << 4; \