From 4b9039266e24523ef199e2b36a05778d9918fd54 Mon Sep 17 00:00:00 2001 From: Samuel Sieb Date: Mon, 22 Feb 2016 15:47:18 -0800 Subject: [PATCH] Fix crash due to force loading changes. --- mesecons/internal.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mesecons/internal.lua b/mesecons/internal.lua index b252983..d479852 100644 --- a/mesecons/internal.lua +++ b/mesecons/internal.lua @@ -357,7 +357,7 @@ end function mesecon.is_power_on(pos, rulename) local node = mesecon.get_node_force(pos) - if mesecon.is_conductor_on(node, rulename) or mesecon.is_receptor_on(node.name) then + if node and (mesecon.is_conductor_on(node, rulename) or mesecon.is_receptor_on(node.name)) then return true end return false @@ -365,7 +365,7 @@ end function mesecon.is_power_off(pos, rulename) local node = mesecon.get_node_force(pos) - if mesecon.is_conductor_off(node, rulename) or mesecon.is_receptor_off(node.name) then + if node and (mesecon.is_conductor_off(node, rulename) or mesecon.is_receptor_off(node.name)) then return true end return false