From 4539d965eda08492a08efd6f5da61a9ad839c2f1 Mon Sep 17 00:00:00 2001 From: Jacob Gustafson <7557867+poikilos@users.noreply.github.com> Date: Mon, 26 Mar 2018 11:49:11 -0400 Subject: [PATCH] fix occasional crash possibly due to unknown node --- init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 77a07bf..31d5d79 100644 --- a/init.lua +++ b/init.lua @@ -173,7 +173,10 @@ minetest.register_globalstep(function(dtime) hunger = tonumber(player:get_attribute("hunger_ng:hunger")) end if ground ~= nil then - walkable = minetest.registered_nodes[ground.name].walkable + local ground_def = minetest.registered_nodes[ground.name] + if ground_def then + walkable = minetest.registered_nodes[ground.name].walkable + end end if player_stamina > 0 and hunger > 6 and walkable then start_sprint(player)