From d54a25acfd95213d3fea470b04ee2fd1185c1cd9 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 4 Dec 2016 14:52:17 +0100 Subject: [PATCH] Fix crash w/ attemp to give award w/o awards mod --- easyvend.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easyvend.lua b/easyvend.lua index b7d37a2..7091558 100644 --- a/easyvend.lua +++ b/easyvend.lua @@ -536,7 +536,7 @@ easyvend.check_earnings = function(buyername, nodemeta) local cost = nodemeta:get_int("cost") local itemname = nodemeta:get_string("itemname") -- First sell - if minetest.get_player_by_name(owner) ~= nil then + if minetest.get_modpath("awards") and minetest.get_player_by_name(owner) ~= nil then awards.unlock(owner, "easyvend_seller") end if itemname ~= easyvend.currency then -- 2.11.4.GIT