summaryrefslogtreecommitdiff
path: root/src/cat/LuaScriptInterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cat/LuaScriptInterface.cpp')
-rw-r--r--src/cat/LuaScriptInterface.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp
index fc00e24..39a5add 100644
--- a/src/cat/LuaScriptInterface.cpp
+++ b/src/cat/LuaScriptInterface.cpp
@@ -303,10 +303,9 @@ tpt.partsdata = nil");
void LuaScriptInterface::Init()
{
- if(luacon_eval("dofile(\"autorun.lua\")"))
- {
- luacon_ci->Log(CommandInterface::LogError, luacon_geterror());
- }
+ if(Client::Ref().FileExists("autorun.lua"))
+ if(luacon_eval("dofile(\"autorun.lua\")"))
+ luacon_ci->Log(CommandInterface::LogError, luacon_geterror());
}
void LuaScriptInterface::SetWindow(ui::Window * window)