aboutsummaryrefslogtreecommitdiff
path: root/games/minimal/mods
diff options
context:
space:
mode:
authorSmallJoker <mk939@ymail.com>2018-05-16 19:36:30 +0200
committerSmallJoker <mk939@ymail.com>2018-05-16 19:44:21 +0200
commit2edeafb97b40f643e559bd347b9846d98eb09f63 (patch)
tree2ea0647b1f0faa359aa5f3a1135d046d87edc2c3 /games/minimal/mods
parenta1868e8f6ca191edc03da342fd7c3088732e1b00 (diff)
downloadminetest-2edeafb97b40f643e559bd347b9846d98eb09f63.tar.gz
minetest-2edeafb97b40f643e559bd347b9846d98eb09f63.tar.bz2
minetest-2edeafb97b40f643e559bd347b9846d98eb09f63.zip
Minimal: Fix HP change crash (#7344)
Diffstat (limited to 'games/minimal/mods')
-rw-r--r--games/minimal/mods/test/init.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/games/minimal/mods/test/init.lua b/games/minimal/mods/test/init.lua
index 3141b4cf3..4806ba4fc 100644
--- a/games/minimal/mods/test/init.lua
+++ b/games/minimal/mods/test/init.lua
@@ -27,6 +27,10 @@ local function run_hpchangereason_tests(player)
assert(expect == nil)
end
minetest.register_on_player_hpchange(function(player, hp, reason)
+ if not expect then
+ return
+ end
+
for key, value in pairs(reason) do
assert(expect[key] == value)
end