diff options
author | James Stevenson <everamzah@users.noreply.github.com> | 2016-09-09 11:47:13 -0400 |
---|---|---|
committer | Zeno- <kde.psych@gmail.com> | 2016-09-10 01:47:13 +1000 |
commit | 403dada85a1e75859573a26ed54a72caa693da91 (patch) | |
tree | d14ba0313850dcf61446e8fa4c9a34ffc47ec73d /src/script/lua_api | |
parent | c0cd7aa351fc59a6f699c6f945673f02f02e8c32 (diff) | |
download | minetest-403dada85a1e75859573a26ed54a72caa693da91.tar.gz minetest-403dada85a1e75859573a26ed54a72caa693da91.tar.bz2 minetest-403dada85a1e75859573a26ed54a72caa693da91.zip |
Return nil on empty get_area() (#4508)
Diffstat (limited to 'src/script/lua_api')
-rw-r--r-- | src/script/lua_api/l_areastore.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/script/lua_api/l_areastore.cpp b/src/script/lua_api/l_areastore.cpp index 20e7875c7..0912e2ab0 100644 --- a/src/script/lua_api/l_areastore.cpp +++ b/src/script/lua_api/l_areastore.cpp @@ -111,6 +111,9 @@ int LuaAreaStore::l_get_area(lua_State *L) const Area *res; res = ast->getArea(id); + if (!res) + return 0; + push_area(L, res, include_borders, include_data); return 1; |