aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/behavior.cpp
diff options
context:
space:
mode:
authorColin Snover2017-11-16 23:56:13 -0600
committerEugene Sandulenko2017-11-18 22:35:12 +0100
commitbd07925134a3c29091ddd4a6df2f7cae80828ab0 (patch)
tree33300af252c8f28b605fbe3f355837ec2b78b5ce /engines/fullpipe/behavior.cpp
parent51b19e97c8d54d88e54cf7c88aca19d7b0962371 (diff)
downloadscummvm-rg350-bd07925134a3c29091ddd4a6df2f7cae80828ab0.tar.gz
scummvm-rg350-bd07925134a3c29091ddd4a6df2f7cae80828ab0.tar.bz2
scummvm-rg350-bd07925134a3c29091ddd4a6df2f7cae80828ab0.zip
FULLPIPE: Fix leaks of MessageQueues
Diffstat (limited to 'engines/fullpipe/behavior.cpp')
-rw-r--r--engines/fullpipe/behavior.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/engines/fullpipe/behavior.cpp b/engines/fullpipe/behavior.cpp
index 2c0cba8f84..db91643fa5 100644
--- a/engines/fullpipe/behavior.cpp
+++ b/engines/fullpipe/behavior.cpp
@@ -173,7 +173,9 @@ void BehaviorManager::updateStaticAniBehavior(StaticANIObject &ani, int delay, c
if (mq) {
mq->setParamInt(-1, ani._odelay);
- mq->chain(&ani);
+ if (!mq->chain(&ani)) {
+ g_fp->_globalMessageQueueList->deleteQueueById(mq->_id);
+ }
}
}