aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_item.cpp
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2018-05-05 22:37:07 +0200
committerGitHub <noreply@github.com>2018-05-05 22:37:07 +0200
commitd99a033fd692546a29cfd4728dbbc5d26ac5c37f (patch)
tree6fc92d79c0d5e294534a839ad4f5fbcbd66e0685 /src/script/cpp_api/s_item.cpp
parent21c720755bfc9fa54fbb2722e0dd5cfbd96f8814 (diff)
downloadminetest-d99a033fd692546a29cfd4728dbbc5d26ac5c37f.tar.gz
minetest-d99a033fd692546a29cfd4728dbbc5d26ac5c37f.tar.bz2
minetest-d99a033fd692546a29cfd4728dbbc5d26ac5c37f.zip
Fix builtin inventory list crash when size = 0 (#7297)
Diffstat (limited to 'src/script/cpp_api/s_item.cpp')
-rw-r--r--src/script/cpp_api/s_item.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/cpp_api/s_item.cpp b/src/script/cpp_api/s_item.cpp
index 5d9d26083..94abe267b 100644
--- a/src/script/cpp_api/s_item.cpp
+++ b/src/script/cpp_api/s_item.cpp
@@ -177,7 +177,7 @@ bool ScriptApiItem::item_CraftPredict(ItemStack &item, ServerActiveObject *user,
const InventoryList *old_craft_grid, const InventoryLocation &craft_inv)
{
SCRIPTAPI_PRECHECKHEADER
-
+ sanity_check(old_craft_grid);
int error_handler = PUSH_ERROR_HANDLER(L);
lua_getglobal(L, "core");