diff options
author | Johannes Schickel | 2011-01-29 19:03:50 +0000 |
---|---|---|
committer | Johannes Schickel | 2011-01-29 19:03:50 +0000 |
commit | d925e38acfaa646e7191a4fd6e5197f323df491d (patch) | |
tree | 01cf96de688607e9803f47fa1fca25ebc4bf6c22 | |
parent | e2b3ac9f2830ca070d2637024c2b80b800190edb (diff) | |
download | scummvm-rg350-d925e38acfaa646e7191a4fd6e5197f323df491d.tar.gz scummvm-rg350-d925e38acfaa646e7191a4fd6e5197f323df491d.tar.bz2 scummvm-rg350-d925e38acfaa646e7191a4fd6e5197f323df491d.zip |
KYRA: Hopefully fix valgrind warnings in the HoF intro when text is disabled.
svn-id: r55623
-rw-r--r-- | engines/kyra/sequences_hof.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp index e92866490b..441436a825 100644 --- a/engines/kyra/sequences_hof.cpp +++ b/engines/kyra/sequences_hof.cpp @@ -2455,8 +2455,10 @@ void KyraEngine_HoF::seq_printCreditsString(uint16 strIndex, int x, int y, const void KyraEngine_HoF::seq_playWsaSyncDialogue(uint16 strIndex, uint16 vocIndex, int textColor, int x, int y, int width, WSAMovie_v2 *wsa, int firstframe, int lastframe, int wsaXpos, int wsaYpos) { int dur = int(strlen(_sequenceStrings[strIndex])) * (_flags.isTalkie ? 7 : 15); - int entry = textEnabled() ? seq_setTextEntry(strIndex, x, y, dur, width) : strIndex; - _activeText[entry].textcolor = textColor; + if (textEnabled()) { + int entry = seq_setTextEntry(strIndex, x, y, dur, width); + _activeText[entry].textcolor = textColor; + } _seqWsaChatTimeout = _system->getMillis() + dur * _tickLength; int curframe = firstframe; |