From 30cfa121efca47a9550ce0b8bb36140714006634 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Wed, 22 Apr 2026 19:52:54 +0200 Subject: [PATCH] more error checking --- src/lua_rds.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lua_rds.c b/src/lua_rds.c index ee590f6..622ff36 100644 --- a/src/lua_rds.c +++ b/src/lua_rds.c @@ -363,6 +363,11 @@ void lua_call_table(const char* function) { void lua_call_tfunction_nolock(const char* name) { lua_getglobal(L, "hooks"); + if (!lua_istable(L, -1)) { + lua_pop(L, 1); + return; + } + lua_getfield(L, -1, name); if (!lua_istable(L, -1)) {