hedgewars/uScript.pas
changeset 6088 47d1b04003d1
parent 6046 d681b8127523
child 6114 443cce9e060f
--- a/hedgewars/uScript.pas	Wed Oct 05 22:57:42 2011 +0400
+++ b/hedgewars/uScript.pas	Thu Oct 06 00:11:55 2011 +0400
@@ -1673,6 +1673,8 @@
 begin
 s:= UserPathz[ptData] + '/' + name;
 if not FileExists(s) then s:= Pathz[ptData] + '/' + name;
+if not FileExists(s) then exit;
+
 ret:= luaL_loadfile(luaState, Str2PChar(s));
 if ret <> 0 then
     begin