1
0
Fork 0

Fix - New game load crashes. Add defensive check. (#4216)

Reviewed-on: MineClone2/MineClone2#4216
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: ancientmarinerdev <ancientmariner_dev@proton.me>
Co-committed-by: ancientmarinerdev <ancientmariner_dev@proton.me>
This commit is contained in:
ancientmarinerdev 2024-03-27 00:22:22 +00:00 committed by the-real-herowl
parent 8931576c50
commit 0b521ef92b
1 changed files with 1 additions and 1 deletions

View File

@ -266,7 +266,7 @@ minetest.register_globalstep(function(dtime)
food_tick_timers[player] = food_tick_timer -- update food_tick_timer table
-- Eating delay code
if mcl_hunger.eat_internal[player_name].is_eating or mcl_hunger.eat_internal[player_name]._custom_do_delayed then
if mcl_hunger.eat_internal[player_name] and mcl_hunger.eat_internal[player_name].is_eating or mcl_hunger.eat_internal[player_name]._custom_do_delayed then
mcl_hunger.eat_internal[player_name].is_eating = true
mcl_hunger.eat_internal[player_name].is_eating_no_padding = true