mirror of
https://github.com/MezzalunaWM/Mezzaluna.git
synced 2026-03-07 19:49:53 -05:00
fix lua oom errors
This commit is contained in:
parent
9553e3831f
commit
1e973eff94
4 changed files with 14 additions and 23 deletions
|
|
@ -41,17 +41,13 @@ pub fn add_keymap(L: *zlua.Lua) i32 {
|
|||
_ = L.pushString("press");
|
||||
_ = L.getTable(3);
|
||||
if (L.isFunction(-1)) {
|
||||
keymap.options.lua_press_ref_idx = L.ref(zlua.registry_index) catch {
|
||||
L.raiseErrorStr("Lua error check your config", .{}); // TODO: Insert more descrptive errors
|
||||
};
|
||||
keymap.options.lua_press_ref_idx = L.ref(zlua.registry_index) catch Utils.oomPanic();
|
||||
}
|
||||
|
||||
_ = L.pushString("release");
|
||||
_ = L.getTable(3);
|
||||
if (L.isFunction(-1)) {
|
||||
keymap.options.lua_release_ref_idx = L.ref(zlua.registry_index) catch {
|
||||
L.raiseErrorStr("Lua error check your config", .{}); // TODO: Insert more descrptive errors
|
||||
};
|
||||
keymap.options.lua_release_ref_idx = L.ref(zlua.registry_index) catch Utils.oomPanic();
|
||||
}
|
||||
|
||||
_ = L.pushString("repeat");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue