[Scummvm-git-logs] scummvm master -> caeb692f956311f7685600f0495a6964554c3d2b

aquadran noreply at scummvm.org
Sun Jul 13 09:27:08 UTC 2025


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
caeb692f95 WINTERMUTE: Temporary W/A for script crash for native null


Commit: caeb692f956311f7685600f0495a6964554c3d2b
    https://github.com/scummvm/scummvm/commit/caeb692f956311f7685600f0495a6964554c3d2b
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2025-07-13T11:27:03+02:00

Commit Message:
WINTERMUTE: Temporary W/A for script crash for native null

Changed paths:
    engines/wintermute/base/scriptables/script.cpp


diff --git a/engines/wintermute/base/scriptables/script.cpp b/engines/wintermute/base/scriptables/script.cpp
index 2ed0fee0d09..6da211149c0 100644
--- a/engines/wintermute/base/scriptables/script.cpp
+++ b/engines/wintermute/base/scriptables/script.cpp
@@ -634,6 +634,16 @@ bool ScScript::executeInstruction() {
 		}
 
 		if (DID_FAIL(res)) {
+
+			// W/A: Avoid crash here:
+			if (var->isNative() && var->getNative() == nullptr) {
+				_stack->correctParams(0);
+				runtimeError("Cannot call method '%s'. Native variable is null.", methodName);
+				_stack->pushNULL();
+				delete[] methodName;
+				break;
+			}
+
 			if (var->isNative() && var->getNative()->canHandleMethod(methodName)) {
 				if (!_unbreakable) {
 					_waitScript = var->getNative()->invokeMethodThread(methodName);




More information about the Scummvm-git-logs mailing list