Skip to content
Permalink
Browse files

Fix crash due to force loading changes.

  • Loading branch information
Samuel Sieb committed Feb 22, 2016
1 parent c7428d8 commit 4b9039266e24523ef199e2b36a05778d9918fd54
Showing with 2 additions and 2 deletions.
  1. +2 −2 mesecons/internal.lua
@@ -357,15 +357,15 @@ 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
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

0 comments on commit 4b90392

Please sign in to comment.