mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-14 09:46:53 -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]
|
||||
runningRobots.foreach(robot => {
|
||||
if (robot.isInvalid) invalid += robot
|
||||
else robot.machine.update()
|
||||
else if (robot.world != null) robot.machine.update()
|
||||
})
|
||||
runningRobots --= invalid
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user