summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2020-03-28 18:31:59 -0500
committercheapie <no-email-for-you@example.com>2020-03-28 18:31:59 -0500
commitd9fd360882529253e261fedd32abbcfe3ef5facd (patch)
treebfb11a3701c36a67fe2b33f999c9f8d8c0013d7a
parent3c7e4a4f823c4c01ae07e519913fe724c22df0d1 (diff)
downloaddigistuff-d9fd360882529253e261fedd32abbcfe3ef5facd.tar
digistuff-d9fd360882529253e261fedd32abbcfe3ef5facd.tar.gz
digistuff-d9fd360882529253e261fedd32abbcfe3ef5facd.tar.bz2
digistuff-d9fd360882529253e261fedd32abbcfe3ef5facd.tar.xz
digistuff-d9fd360882529253e261fedd32abbcfe3ef5facd.zip
Fix crash when clicking air with a card
-rw-r--r--cardreader.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/cardreader.lua b/cardreader.lua
index 06a3235..3279e90 100644
--- a/cardreader.lua
+++ b/cardreader.lua
@@ -19,6 +19,7 @@ minetest.register_craftitem("digistuff:card",{
stack_max = 1,
on_use = function(stack,_,pointed)
local pos = pointed.under
+ if not pos then return end
if minetest.get_node(pos).name ~= "digistuff:card_reader" then return end
local meta = minetest.get_meta(pos)
local channel = meta:get_string("channel")