mirror of
https://github.com/0O0o0oOoO00/Alas.git
synced 2026-05-14 14:19:25 +08:00
opt: pre return when loading other lua resource
This commit is contained in:
@@ -135,6 +135,12 @@ int (*old_luaL_loadbuffer) (lua_State *L, const char *buff, size_t sz, const cha
|
||||
int my_luaL_loadbuffer(lua_State *L, const char *buff, size_t sz,const char *name) {
|
||||
auto ret = old_luaL_loadbuffer(L, buff, sz, name);
|
||||
if (!g_is_panel_loaded) {
|
||||
if (name == nullptr) {
|
||||
return ret;
|
||||
}
|
||||
if (name[0] != '@') {
|
||||
return ret;
|
||||
}
|
||||
if (strstr(name, "SettingsNotificationPanel") != nullptr) {
|
||||
g_target_L = L;
|
||||
g_is_panel_loaded = true;
|
||||
|
||||
Reference in New Issue
Block a user