From b2cee2f7af258c6e5e7cab2e8ad7513cbf90fe56 Mon Sep 17 00:00:00 2001 From: Cekis Date: Wed, 25 May 2016 23:25:39 +0100 Subject: [PATCH] Fixed situation caused when crafting weapons that an error would be thrown in the logs because the crafting component was consumed and no longer existed. --- .../component/crafting_weapon_component_attribute.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sku.0/sys.server/compiled/game/script/systems/crafting/weapon/component/crafting_weapon_component_attribute.java b/sku.0/sys.server/compiled/game/script/systems/crafting/weapon/component/crafting_weapon_component_attribute.java index 005d01cac..7e7bc50bb 100755 --- a/sku.0/sys.server/compiled/game/script/systems/crafting/weapon/component/crafting_weapon_component_attribute.java +++ b/sku.0/sys.server/compiled/game/script/systems/crafting/weapon/component/crafting_weapon_component_attribute.java @@ -27,9 +27,11 @@ public class crafting_weapon_component_attribute extends script.base_script } public int OnGetAttributes(obj_id self, obj_id player, String[] names, String[] attribs) throws InterruptedException { - if (isIdValid(self) && exists(self) && hasObjVar(self, "forceComponent") && !isJedi(player) && !isGod(player)) - { - return SCRIPT_OVERRIDE; + if(!isIdValid(self) || !exists(self) || self == null || self == obj_id.NULL_ID){ + return SCRIPT_CONTINUE; + } + if (isIdValid(self) && exists(self) && hasObjVar(self, "forceComponent") && !isJedi(player) && !isGod(player)){ + return SCRIPT_CONTINUE; } int idx = utils.getValidAttributeIndex(names); if (idx == -1)