From 58fcb43c192eb424897a89dd18ea4788e83deb3f Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 25 May 2014 17:38:28 +0200 Subject: CINE: Add a safeguard to avoid incrementing a null pointer --- engines/cine/gfx.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engines/cine') diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index f6419ecafc..b9175cac72 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -1902,7 +1902,9 @@ void maskBgOverlay(const byte *bgPtr, const byte *maskPtr, int16 width, int16 he destPtr++; srcPtr++; - maskPtr++; + + if (maskPtr) + maskPtr++; } } -- cgit v1.2.3