Space Haven

Space Haven

[bug] Clicking overlapping menus causes crash
I'm not sure I could replicate it myself, but the conditions were as follows:

There was a cargo shuttle right next to a ship. I was zoomed out enough that clicking the cargo shuttle also selected the ship. The trade menu opened, hiding the cargo shuttle behind it. Despite this, there were little transfer buttons overlayed on top of the ship menu, at the location on the screen that the cargo shuttle was located at. Out of curiosity, I tried to click one, and the game crashed.

Here is the crashlog:

Thread[Thread-2,5,main]
java.lang.NullPointerException
fi.bugbyte.spacehaven.gui.MenuSystemItems2$ShipTransferSalvageInfoItem$3.clicked(MenuSystemItems2.java:3796)
fi.bugbyte.framework.screen.StageButton.buttonTouched(StageButton.java:458)
fi.bugbyte.framework.screen.ButtonsManager.update(ButtonsManager.java:262)
fi.bugbyte.framework.screen.Screen.updateScreen(Screen.java:534)
fi.bugbyte.spacehaven.HavenGameState.updateLogic(HavenGameState.java:646)
fi.bugbyte.framework.physics.TimeStep$SimpleStep.start(TimeStep.java:222)
fi.bugbyte.spacehaven.HavenGameState.run(HavenGameState.java:632)
fi.bugbyte.framework.Game.render(Game.java:1051)
com.badlogic.gdx.backends.lwjgl3.Lwjgl3Window.update(Lwjgl3Window.java:387)
com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.loop(Lwjgl3Application.java:193)
com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:165)
fi.bugbyte.spacehaven.MainClass$6.run(MainClass.java:493)
java.lang.Thread.run(Thread.java:750)