diff options
author | Mattes D <github@xoft.cz> | 2014-10-23 08:40:39 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-10-23 08:40:39 +0200 |
commit | f8c54f4243049abbcafff1e96f994f742ea9f50d (patch) | |
tree | 67fe10bfea90cbb21952039bd795666682d43ad5 /MCServer/Plugins/InfoDump.lua | |
parent | Compile fix? (diff) | |
parent | Merge pull request #1559 from mc-server/nullptr (diff) | |
download | cuberite-f8c54f4243049abbcafff1e96f994f742ea9f50d.tar cuberite-f8c54f4243049abbcafff1e96f994f742ea9f50d.tar.gz cuberite-f8c54f4243049abbcafff1e96f994f742ea9f50d.tar.bz2 cuberite-f8c54f4243049abbcafff1e96f994f742ea9f50d.tar.lz cuberite-f8c54f4243049abbcafff1e96f994f742ea9f50d.tar.xz cuberite-f8c54f4243049abbcafff1e96f994f742ea9f50d.tar.zst cuberite-f8c54f4243049abbcafff1e96f994f742ea9f50d.zip |
Diffstat (limited to '')
-rw-r--r-- | MCServer/Plugins/InfoDump.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/MCServer/Plugins/InfoDump.lua b/MCServer/Plugins/InfoDump.lua index bc9bab767..de1d1f451 100644 --- a/MCServer/Plugins/InfoDump.lua +++ b/MCServer/Plugins/InfoDump.lua @@ -625,7 +625,11 @@ local function LoadPluginInfo(a_FolderName) -- This is Lua-5.1-specific and won't work in Lua 5.2! local Sandbox = {} setfenv(cfg, Sandbox) - cfg() + local isSuccess, errMsg = pcall(cfg) + if not(isSuccess) then + return nil, "Cannot load Info.lua: " .. (errMsg or "<unknown error>") + end + if (Sandbox.g_PluginInfo == nil) then return nil, "Info.lua doesn't contain the g_PluginInfo declaration" end |