From d925e38acfaa646e7191a4fd6e5197f323df491d Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 29 Jan 2011 19:03:50 +0000 Subject: KYRA: Hopefully fix valgrind warnings in the HoF intro when text is disabled. svn-id: r55623 --- engines/kyra/sequences_hof.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engines/kyra') 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; -- cgit v1.2.3