aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2014-05-25 14:39:15 -0400
committerPaul Gilbert2014-05-25 14:39:15 -0400
commit6f046eafded01e00beddc7533989a06c50b05624 (patch)
tree9f56dbbb00c4dcfe8c52e9e2117ec1c69bdaa395 /engines
parent142f2ad208d0dc76d36986c642bbd0f94bde30b9 (diff)
downloadscummvm-rg350-6f046eafded01e00beddc7533989a06c50b05624.tar.gz
scummvm-rg350-6f046eafded01e00beddc7533989a06c50b05624.tar.bz2
scummvm-rg350-6f046eafded01e00beddc7533989a06c50b05624.zip
MADS: Fix for assert when a scene uses more than one animation
Diffstat (limited to 'engines')
-rw-r--r--engines/mads/scene.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/mads/scene.cpp b/engines/mads/scene.cpp
index 13913030df..4af956a9f6 100644
--- a/engines/mads/scene.cpp
+++ b/engines/mads/scene.cpp
@@ -591,7 +591,11 @@ void Scene::checkKeyboard() {
}
void Scene::loadAnimation(const Common::String &resName, int trigger) {
- assert(_activeAnimation == nullptr);
+ // WORKAROUND: If there's already a previous active animation used by the
+ // scene, then free it before we create the new one
+ if (_activeAnimation)
+ freeAnimation();
+
DepthSurface depthSurface(_vm);
UserInterface interfaceSurface(_vm);