From e483c5e48f3c9e22871f2d2ea47d2127e3905c92 Mon Sep 17 00:00:00 2001 From: arch1t3cht Date: Wed, 21 Jun 2023 21:29:23 +0200 Subject: [PATCH] lua: Fix crash after 79050df Replacing all uses of LuaToAssEntry with LuaToTrackedAssEntry also replaced its use in LuaParseKaraokeData, which would cause a double free when canceling a script after calling parse_karaoke_data. --- src/auto4_lua_assfile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/auto4_lua_assfile.cpp b/src/auto4_lua_assfile.cpp index e73a48920..40a2c7d74 100644 --- a/src/auto4_lua_assfile.cpp +++ b/src/auto4_lua_assfile.cpp @@ -631,7 +631,7 @@ namespace Automation4 { int LuaAssFile::LuaParseKaraokeData(lua_State *L) { - auto e = LuaToTrackedAssEntry(L); + auto e = LuaToAssEntry(L, ass); auto dia = check_cast_constptr(e.get()); argcheck(L, !!dia, 1, "Subtitle line must be a dialogue line");