mirror of
https://github.com/radio95-rnt/rds95.git
synced 2026-07-29 16:29:17 +02:00
more error checking
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user