From f8fee398dbfa7bf873033f79c15c6863c7dc7226 Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 5 Aug 2016 21:03:22 +0200 Subject: [PATCH] Chess: Don't crash on nil-player calling can_dig. --- chess.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/chess.lua b/chess.lua index 8e0691e..baeab14 100644 --- a/chess.lua +++ b/chess.lua @@ -556,6 +556,9 @@ function realchess.fields(pos, _, fields, sender) end function realchess.dig(pos, player) + if not player then + return false + end local meta = minetest.get_meta(pos) local playerName = player:get_player_name() local timeout_limit = meta:get_int("lastMoveTime") + 300 -- 2.44.0