diff options
author | Johannes Schickel | 2008-08-10 00:17:56 +0000 |
---|---|---|
committer | Johannes Schickel | 2008-08-10 00:17:56 +0000 |
commit | 8268b5c210ee5fd7fa264ecd570c98b26b245d60 (patch) | |
tree | 9c632242fd49235afa1d17ff999e1e0b5b9be318 | |
parent | dca7116cb54026cfa3ee25148cf3b961f7febdd2 (diff) | |
download | scummvm-rg350-8268b5c210ee5fd7fa264ecd570c98b26b245d60.tar.gz scummvm-rg350-8268b5c210ee5fd7fa264ecd570c98b26b245d60.tar.bz2 scummvm-rg350-8268b5c210ee5fd7fa264ecd570c98b26b245d60.zip |
Fixed crash in KyraEngine_HoF::pauseEngineIntern.
svn-id: r33733
-rw-r--r-- | engines/kyra/kyra_hof.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index 08e13a54af..b642248665 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -196,14 +196,18 @@ void KyraEngine_HoF::pauseEngineIntern(bool pause) { _seqWsaChatTimeout += pausedTime; _seqWsaChatFrameTimeout += pausedTime; - for (int x = 0; x < 10; x++) { - if (_activeText[x].duration != -1) - _activeText[x].startTime += pausedTime; + if (_activeText) { + for (int x = 0; x < 10; x++) { + if (_activeText[x].duration != -1) + _activeText[x].startTime += pausedTime; + } } - for (int x = 0; x < 8; x++) { - if (_activeWSA[x].flags != -1) - _activeWSA[x].nextFrame += pausedTime; + if (_activeWSA) { + for (int x = 0; x < 8; x++) { + if (_activeWSA[x].flags != -1) + _activeWSA[x].nextFrame += pausedTime; + } } _nextIdleAnim += pausedTime; |