From 85f56f7ba0346c2f65b3109329922db41b6df746 Mon Sep 17 00:00:00 2001 From: stujones11 Date: Mon, 21 Apr 2014 19:10:24 +0100 Subject: [PATCH] Check for valid player inventory --- 3d_armor/armor.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/3d_armor/armor.lua b/3d_armor/armor.lua index 8fad9a2..ccb074c 100644 --- a/3d_armor/armor.lua +++ b/3d_armor/armor.lua @@ -80,6 +80,9 @@ armor.set_player_armor = function(self, player) end local name = player:get_player_name() local player_inv = player:get_inventory() + if not name or not player_inv then + return + end local armor_texture = "3d_armor_trans.png" local armor_level = 0 local armor_heal = 0