SCI: Fix use-after-free when kernel call debugging is active during a save game restore

This commit is contained in:
Colin Snover
2017-09-27 20:27:33 -05:00
parent 9a8070da3c
commit 4bd31dae9b
+4
View File
@@ -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);