aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/script/lua_api/l_areastore.cpp3
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;