mirror of
https://github.com/MezzalunaWM/Mezzaluna.git
synced 2026-03-08 04:57:32 -04:00
fix lua oom errors
This commit is contained in:
parent
9553e3831f
commit
1e973eff94
4 changed files with 14 additions and 23 deletions
|
|
@ -39,9 +39,7 @@ pub fn add(L: *zlua.Lua) i32 {
|
|||
_ = L.pushString("callback");
|
||||
_ = L.getTable(2);
|
||||
if (L.isFunction(-1)) {
|
||||
hook.options.lua_cb_ref_idx = L.ref(zlua.registry_index) catch {
|
||||
L.raiseErrorStr("Lua error check your config", .{}); // TODO: Give more descriptive error
|
||||
};
|
||||
hook.options.lua_cb_ref_idx = try L.ref(zlua.registry_index);
|
||||
}
|
||||
|
||||
try server.hooks.append(gpa, hook);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue