[Scummvm-git-logs] scummvm master -> 8959ac82e48193c83c056d057b303ba2f64f6ce2

aquadran noreply at scummvm.org
Sat Nov 22 21:25:18 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:
8959ac82e4 GRIM: Handle SayLine Lua call with nil parameter


Commit: 8959ac82e48193c83c056d057b303ba2f64f6ce2
    https://github.com/scummvm/scummvm/commit/8959ac82e48193c83c056d057b303ba2f64f6ce2
Author: Christian Krause (chkr at plauener.de)
Date: 2025-11-22T22:25:14+01:00

Commit Message:
GRIM: Handle SayLine Lua call with nil parameter

- if the 2nd argument of the Lua call SayLine is nil, msgId would be a nullptr
- that would trigger an assert for msgId in Actor::sayLine()
- this patch avoids calling Actor::sayLine() if msgId is not
  set to an actual value
- fixes https://bugs.scummvm.org/ticket/13736

Changed paths:
    engines/grim/lua_v1_text.cpp


diff --git a/engines/grim/lua_v1_text.cpp b/engines/grim/lua_v1_text.cpp
index 4f7c6e32a97..57715a5e49b 100644
--- a/engines/grim/lua_v1_text.cpp
+++ b/engines/grim/lua_v1_text.cpp
@@ -299,8 +299,9 @@ void Lua_V1::SayLine() {
 				}
 				paramObj = lua_getparam(paramId++);
 			}
-
-			actor->sayLine(msgId, background, x, y); // background, vol, pan, x, y
+			if (msgId) {
+				actor->sayLine(msgId, background, x, y); // background, vol, pan, x, y
+			}
 		}
 	}
 }




More information about the Scummvm-git-logs mailing list