diff options
author | Bass <tudurap.com@gmail.com> | 2019-11-14 17:55:50 +0000 |
---|---|---|
committer | Bass <tudurap.com@gmail.com> | 2019-11-14 17:55:50 +0000 |
commit | 01088f97ac790a062308e193de1732f8775abc63 (patch) | |
tree | 7118c168abea0e0562395ac97cbb7544c106e5c8 /src | |
parent | 8b23cc83bae6caa56d599379db2c6de6344342f7 (diff) | |
download | GT5-Unofficial-01088f97ac790a062308e193de1732f8775abc63.tar.gz GT5-Unofficial-01088f97ac790a062308e193de1732f8775abc63.tar.bz2 GT5-Unofficial-01088f97ac790a062308e193de1732f8775abc63.zip |
Fixed crash on Tesla tower removal
nested the onRemoval() due to an occasional java.lang.NullPointerException: Ticking memory connection
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java index a95963f1a7..bd651b4d00 100644 --- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java +++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_TM_teslaCoil.java @@ -35,6 +35,7 @@ import java.util.Map; import static com.github.technus.tectech.CommonValues.V; import static com.github.technus.tectech.Util.*; +import static com.github.technus.tectech.loader.TecTechConfig.DEBUG_MODE; import static com.github.technus.tectech.thing.casing.GT_Block_CasingsTT.texturePage; import static com.github.technus.tectech.thing.casing.TT_Container_Casings.sBlockCasingsBA0; import static com.github.technus.tectech.thing.metaTileEntity.multi.base.LedStatus.*; @@ -441,10 +442,16 @@ public class GT_MetaTileEntity_TM_teslaCoil extends GT_MetaTileEntity_Multiblock @Override public void onRemoval() { - super.onRemoval(); - for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { - cap.getBaseMetaTileEntity().setActive(false); + try { + for (GT_MetaTileEntity_Hatch_Capacitor cap : eCapacitorHatches) { + cap.getBaseMetaTileEntity().setActive(false); + } + } catch (Exception e) { + if (DEBUG_MODE) { + e.printStackTrace(); + } } + super.onRemoval(); } @Override |