forked from mia/Aegisub
Fix crash after inserting lines via subs.insert
This commit is contained in:
parent
96a2a98e39
commit
1bd63ce35c
1 changed files with 2 additions and 1 deletions
|
@ -542,7 +542,8 @@ namespace Automation4 {
|
||||||
}
|
}
|
||||||
|
|
||||||
int n = lua_gettop(L);
|
int n = lua_gettop(L);
|
||||||
std::vector<AssEntry *> new_entries(n - 1, nullptr);
|
std::vector<AssEntry *> new_entries;
|
||||||
|
new_entries.reserve(n - 1);
|
||||||
for (int i = 2; i <= n; i++) {
|
for (int i = 2; i <= n; i++) {
|
||||||
lua_pushvalue(L, i);
|
lua_pushvalue(L, i);
|
||||||
auto e = LuaToAssEntry(L);
|
auto e = LuaToAssEntry(L);
|
||||||
|
|
Loading…
Reference in a new issue