Skip to content

Commit 2edeafb

Browse files
committed
Minimal: Fix HP change crash (#7344)
1 parent a1868e8 commit 2edeafb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

games/minimal/mods/test/init.lua

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ local function run_hpchangereason_tests(player)
2727
assert(expect == nil)
2828
end
2929
minetest.register_on_player_hpchange(function(player, hp, reason)
30+
if not expect then
31+
return
32+
end
33+
3034
for key, value in pairs(reason) do
3135
assert(expect[key] == value)
3236
end

0 commit comments

Comments
 (0)