mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-15 02:12:42 -04:00
Fixed potential NPE in robot update.
This commit is contained in:
parent
4ceb63e5fb
commit
56184a210a
@ -121,7 +121,7 @@ object EventHandler {
|
|||||||
val invalid = mutable.ArrayBuffer.empty[Robot]
|
val invalid = mutable.ArrayBuffer.empty[Robot]
|
||||||
runningRobots.foreach(robot => {
|
runningRobots.foreach(robot => {
|
||||||
if (robot.isInvalid) invalid += robot
|
if (robot.isInvalid) invalid += robot
|
||||||
else robot.machine.update()
|
else if (robot.world != null) robot.machine.update()
|
||||||
})
|
})
|
||||||
runningRobots --= invalid
|
runningRobots --= invalid
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user