author | unc0rr |
Sat, 04 Dec 2010 23:30:20 +0300 | |
changeset 4459 | 6de30ddc184e |
parent 4458 | 7351e6f1ee28 (current diff) |
parent 4456 | b69f43f07cd7 (diff) |
child 4460 | bdace1e2f8aa |
--- a/hedgewars/uScript.pas Sat Dec 04 23:29:59 2010 +0300 +++ b/hedgewars/uScript.pas Sat Dec 04 23:30:20 2010 +0300 @@ -263,7 +263,8 @@ c:= lua_toboolean(L, 5); vg:= AddVisualGear(x, y, vgt, s, c); - lua_pushnumber(L, vg^.uid) + if vg <> nil then lua_pushnumber(L, vg^.uid) + else lua_pushnumber(L, 0) end; lc_addvisualgear:= 1; // 1 return value end;