aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/lastexpress/data/animation.cpp2
-rw-r--r--engines/lastexpress/game/sound.cpp5
2 files changed, 5 insertions, 2 deletions
diff --git a/engines/lastexpress/data/animation.cpp b/engines/lastexpress/data/animation.cpp
index d105a34f8c..7288889f09 100644
--- a/engines/lastexpress/data/animation.cpp
+++ b/engines/lastexpress/data/animation.cpp
@@ -286,7 +286,7 @@ void Animation::play() {
g_engine->_system->delayMillis(20);
// Handle right-click to interrupt animations
- Common::Event ev;
+ Common::Event ev = Common::Event();
while (g_engine->getEventManager()->pollEvent(ev)) {
if (ev.type == Common::EVENT_RBUTTONUP) {
// Stop audio
diff --git a/engines/lastexpress/game/sound.cpp b/engines/lastexpress/game/sound.cpp
index 6392efe522..652703c285 100644
--- a/engines/lastexpress/game/sound.cpp
+++ b/engines/lastexpress/game/sound.cpp
@@ -119,9 +119,12 @@ SoundManager::SoundManager(LastExpressEngine *engine) : _engine(engine), _state(
SoundManager::~SoundManager() {
for (Common::List<SoundEntry *>::iterator i = _cache.begin(); i != _cache.end(); ++i)
SAFE_DELETE(*i);
-
_cache.clear();
+ for (Common::List<SubtitleEntry *>::iterator i = _subtitles.begin(); i != _subtitles.end(); ++i)
+ SAFE_DELETE(*i);
+ _subtitles.clear();
+
_currentSubtitle = NULL;
// Zero passed pointers