summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-10-05 15:04:55 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-10-05 15:04:55 (GMT)
commit0fbe12772dfb28abb491ac0b5a51854de8a30b4e (patch)
treecd2ab1d4d09ca7d2a933fe447cdc706b75dd5f05 /src
parent5c59b9d6cb39a1786d3a859a0a8e9e44a6a86d9c (diff)
downloadpowder-0fbe12772dfb28abb491ac0b5a51854de8a30b4e.zip
powder-0fbe12772dfb28abb491ac0b5a51854de8a30b4e.tar.gz
Only run autorun if it exists
Diffstat (limited to 'src')
-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)