aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorColin Snover2017-09-25 21:14:28 -0500
committerColin Snover2017-09-27 20:27:33 -0500
commit4bd31dae9b638bb6c80ddc3db7b41f34c68626fc (patch)
treeb4e4f3f49bc282a9c4177bed5b4f0fdba283decc /engines/sci
parent9a8070da3c533dd4885e8044051a5e1a9caac9bb (diff)
downloadscummvm-rg350-4bd31dae9b638bb6c80ddc3db7b41f34c68626fc.tar.gz
scummvm-rg350-4bd31dae9b638bb6c80ddc3db7b41f34c68626fc.tar.bz2
scummvm-rg350-4bd31dae9b638bb6c80ddc3db7b41f34c68626fc.zip
SCI: Fix use-after-free when kernel call debugging is active during a save game restore
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/scriptdebug.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index cfe0ebeb64..d46b630292 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -988,6 +988,10 @@ void debugPropertyAccess(Object *obj, reg_t objp, unsigned int index, reg_t curV
}
void logKernelCall(const KernelFunction *kernelCall, const KernelSubFunction *kernelSubCall, EngineState *s, int argc, reg_t *argv, reg_t result) {
+ if (s->abortScriptProcessing != kAbortNone) {
+ return;
+ }
+
Kernel *kernel = g_sci->getKernel();
if (!kernelSubCall) {
debugN("k%s: ", kernelCall->name);