mirror of
https://github.com/radio95-rnt/rds95.git
synced 2026-07-31 17: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) {
|
void lua_call_tfunction_nolock(const char* name) {
|
||||||
lua_getglobal(L, "hooks");
|
lua_getglobal(L, "hooks");
|
||||||
|
if (!lua_istable(L, -1)) {
|
||||||
|
lua_pop(L, 1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
lua_getfield(L, -1, name);
|
lua_getfield(L, -1, name);
|
||||||
|
|
||||||
if (!lua_istable(L, -1)) {
|
if (!lua_istable(L, -1)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user