aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorEugene Sandulenko2019-12-27 22:43:11 +0100
committerEugene Sandulenko2019-12-27 22:43:11 +0100
commit29a07afc58bb02b04c5f9dcbc7ac6cb4095accba (patch)
tree63fc57cf66120c3a55e8ba674fc0b337227387b4 /graphics
parent77adfd762e5e7c0dc95086e73a9bb0985ebd3728 (diff)
downloadscummvm-rg350-29a07afc58bb02b04c5f9dcbc7ac6cb4095accba.tar.gz
scummvm-rg350-29a07afc58bb02b04c5f9dcbc7ac6cb4095accba.tar.bz2
scummvm-rg350-29a07afc58bb02b04c5f9dcbc7ac6cb4095accba.zip
GRAPHICS: MACGUI: Enhance sanity check for pattern references
Diffstat (limited to 'graphics')
-rw-r--r--graphics/macgui/macwindowmanager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics/macgui/macwindowmanager.cpp b/graphics/macgui/macwindowmanager.cpp
index 570c526565..12cd391f92 100644
--- a/graphics/macgui/macwindowmanager.cpp
+++ b/graphics/macgui/macwindowmanager.cpp
@@ -284,7 +284,7 @@ void MacWindowManager::removeWindow(MacWindow *target) {
void macDrawPixel(int x, int y, int color, void *data) {
MacPlotData *p = (MacPlotData *)data;
- if (p->fillType > p->patterns->size())
+ if (p->fillType > p->patterns->size() || !p->fillType)
return;
byte *pat = p->patterns->operator[](p->fillType - 1);