Skip to content

Commit

Permalink
Fix crash due to force loading changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Sieb committed Feb 22, 2016
1 parent c7428d8 commit 4b90392
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mesecons/internal.lua
Expand Up @@ -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
Expand Down

0 comments on commit 4b90392

Please sign in to comment.