mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-16 18:55:03 -04:00
Fixed potential NPE in rotatable class... probably.
Dem race conditions.
This commit is contained in:
parent
f7ff8afdab
commit
673f3d9a8f
@ -148,13 +148,13 @@ trait Rotatable extends RotationAware with internal.Rotatable {
|
|||||||
else false
|
else false
|
||||||
}
|
}
|
||||||
|
|
||||||
override def toLocal(value: EnumFacing) = if (value != null) {
|
override def toLocal(value: EnumFacing) = if (value != null) this.synchronized {
|
||||||
updateTranslation()
|
updateTranslation()
|
||||||
cachedTranslation(value.ordinal)
|
cachedTranslation(value.ordinal)
|
||||||
}
|
}
|
||||||
else null
|
else null
|
||||||
|
|
||||||
override def toGlobal(value: EnumFacing) = if (value != null) {
|
override def toGlobal(value: EnumFacing) = if (value != null) this.synchronized {
|
||||||
updateTranslation()
|
updateTranslation()
|
||||||
cachedInverseTranslation(value.ordinal)
|
cachedInverseTranslation(value.ordinal)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user