Guard against nil player

https://gitlab.com/sztest/nodecore/-/issues/14
Unable to reproduce the crash, but the fix
seems obvious given the symptom.
This commit is contained in:
Aaron Suen 2022-06-26 08:13:56 -04:00
parent 81a5c6dad5
commit 0c7e0e819b

View File

@ -23,6 +23,7 @@ end
local olddrop = minetest.item_drop
function minetest.item_drop(item, player, ...)
if not player then return olddrop(item, player, ...) end
nodecore.player_discover(player, "item_drop")
local pctl = player:get_player_control()
if pctl.aux1 then