aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/agos/cursor.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/agos/cursor.cpp b/engines/agos/cursor.cpp
index 864f6b280a..ffb752f411 100644
--- a/engines/agos/cursor.cpp
+++ b/engines/agos/cursor.cpp
@@ -664,7 +664,7 @@ void AGOSEngine::drawMousePointer() {
} else if (getGameType() == GType_SIMON1) {
CursorMan.replaceCursor(_mouseData, 16, 16, 0, 0, 0xFF);
} else {
- const uint16 *src;
+ const uint16 *src = NULL;
int i, j;
const uint8 color = (getGameType() == GType_ELVIRA1) ? 15: 65;
@@ -721,6 +721,8 @@ void AGOSEngine::drawMousePointer() {
if (_dragFlag != 0)
src = _common_handInfo;
+ assert(src);
+
for (i = 0; i < 16; i++) {
for (j = 0; j < 16; j++) {
if (src[0] & (1 << (15 - (j % 16)))) {