ToroCraft / Minecoprocessors

Increase your redstone possibilities and learn assembly programming at the same time with the Minecoprocessors Minecraft Mod!
https://minecraft.curseforge.com/projects/minecoprocessors
GNU General Public License v3.0
33 stars 10 forks source link

Potential null pointer access #30

Closed josephcsible closed 7 years ago

josephcsible commented 7 years ago

https://github.com/ToroCraft/Minecoprocessors/blob/73afe845c22b2ce000a9fae0a5e700111ea664ed/src/main/java/net/torocraft/minecoprocessors/gui/GuiMinecoprocessor.java#L127-L133

It looks like you expect registers to sometimes be null, but you try to access it without checking it. This will cause a crash if it ever does happen to be null.