From 07b40c02fe595ac30982429ef6019227f6026449 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Guilloux?= Date: Sun, 29 Jan 2023 23:27:29 +0100 Subject: [PATCH] Fix #10361, fe30f66: Don't try to give saved data to a dead script (#10433) --- src/script/script_instance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/script_instance.cpp b/src/script/script_instance.cpp index 7375f65e3d..c02003a8a7 100644 --- a/src/script/script_instance.cpp +++ b/src/script/script_instance.cpp @@ -691,7 +691,7 @@ void ScriptInstance::LoadOnStack(ScriptData *data) { ScriptObject::ActiveInstance active(this); - if (data == nullptr) return; + if (this->IsDead() || data == nullptr) return; HSQUIRRELVM vm = this->engine->GetVM();