summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2016-02-23 10:20:09 +0100
committerJeija <norrepli@gmail.com>2016-02-23 10:20:09 +0100
commit2dc8101fa1ec132397284032f82926dc2c5d41f6 (patch)
treeda29b21db3cc1c5e7db5bc4e9cf3bc4d67585cdc
parentc7428d8135223406d3af8be6bb446300574402c2 (diff)
parent4b9039266e24523ef199e2b36a05778d9918fd54 (diff)
downloadmesecons-2dc8101fa1ec132397284032f82926dc2c5d41f6.tar
mesecons-2dc8101fa1ec132397284032f82926dc2c5d41f6.tar.gz
mesecons-2dc8101fa1ec132397284032f82926dc2c5d41f6.tar.bz2
mesecons-2dc8101fa1ec132397284032f82926dc2c5d41f6.tar.xz
mesecons-2dc8101fa1ec132397284032f82926dc2c5d41f6.zip
Merge branch 'ssieb-master'
-rw-r--r--mesecons/internal.lua4
1 files 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