From 78953e1818e308e47788b7888a1d747abfc59228 Mon Sep 17 00:00:00 2001 From: Paweł Kołodziejski Date: Sun, 27 May 2007 10:53:09 +0000 Subject: fixed warning and add assert for potential uninitialised src svn-id: r26964 --- engines/agos/cursor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'engines/agos') 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)))) { -- cgit v1.2.3