From 45fc22246784e5a5746ac57be9d7c29aa2990763 Mon Sep 17 00:00:00 2001 From: "Oleg V. Polivets" Date: Tue, 2 Feb 2021 04:09:51 +0300 Subject: [PATCH] fix: ppuViewer crashes the app when ROM is not opened (#319) --- src/drivers/Qt/ppuViewer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/drivers/Qt/ppuViewer.cpp b/src/drivers/Qt/ppuViewer.cpp index 0987c38a..5c9136da 100644 --- a/src/drivers/Qt/ppuViewer.cpp +++ b/src/drivers/Qt/ppuViewer.cpp @@ -1255,6 +1255,9 @@ static void DrawPatternTable( ppuPatternTable_t *pattern, uint8_t *table, uint8_ int p=0,tmp; uint8_t chr0,chr1,logs,shift; + if (!palo) + return; + pal <<= 2; for (i = 0; i < 16; i++) //Columns {