aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Milburn2013-04-17 23:20:31 +0200
committerAlyssa Milburn2013-04-17 23:20:31 +0200
commit1eefd6301bc246d397cd9f1cfebee978fa4e92de (patch)
tree7f5e827cfc8eb532b2b8d8bf65defdb51155af8f
parentc9ccba01df8abacd30b87d6b8b0904fb87b1b2f7 (diff)
downloadscummvm-rg350-1eefd6301bc246d397cd9f1cfebee978fa4e92de.tar.gz
scummvm-rg350-1eefd6301bc246d397cd9f1cfebee978fa4e92de.tar.bz2
scummvm-rg350-1eefd6301bc246d397cd9f1cfebee978fa4e92de.zip
PARALLACTION: Don't use an invalid array index.
-rw-r--r--engines/parallaction/dialogue.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp
index 78cc23311f..06ffd0b89b 100644
--- a/engines/parallaction/dialogue.cpp
+++ b/engines/parallaction/dialogue.cpp
@@ -238,7 +238,7 @@ int16 DialogueManager::selectAnswerN() {
_selection = _balloonMan->hitTestDialogueBalloon(_mousePos.x, _mousePos.y);
- VisibleAnswer *oldAnswer = &_visAnswers[_oldSelection];
+ VisibleAnswer *oldAnswer = (_oldSelection == NO_ANSWER_SELECTED) ? NULL : &_visAnswers[_oldSelection];
VisibleAnswer *answer = &_visAnswers[_selection];
if (_selection != _oldSelection) {