mirror of https://github.com/odrling/Aegisub
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.
This commit is contained in:
parent
42f7e53e92
commit
e483c5e48f
|
@ -631,7 +631,7 @@ namespace Automation4 {
|
||||||
|
|
||||||
int LuaAssFile::LuaParseKaraokeData(lua_State *L)
|
int LuaAssFile::LuaParseKaraokeData(lua_State *L)
|
||||||
{
|
{
|
||||||
auto e = LuaToTrackedAssEntry(L);
|
auto e = LuaToAssEntry(L, ass);
|
||||||
auto dia = check_cast_constptr<AssDialogue>(e.get());
|
auto dia = check_cast_constptr<AssDialogue>(e.get());
|
||||||
argcheck(L, !!dia, 1, "Subtitle line must be a dialogue line");
|
argcheck(L, !!dia, 1, "Subtitle line must be a dialogue line");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue