mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-09 10:04:05 +09:00
controlpanel: disregarding NPE
This commit is contained in:
@@ -93,9 +93,15 @@ class ModOptionsHost(val remoCon: UIRemoCon) : UICanvas() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun renderUI(frameDelta: Float, batch: SpriteBatch, camera: OrthographicCamera) {
|
override fun renderUI(frameDelta: Float, batch: SpriteBatch, camera: OrthographicCamera) {
|
||||||
// the actual control panel
|
try {
|
||||||
ControlPanelCommon.render("basegame.modcontrolpanel.$currentlySelectedModule", width, batch)
|
// the actual control panel
|
||||||
uiItems.forEach { it.render(frameDelta, batch, camera) }
|
ControlPanelCommon.render("basegame.modcontrolpanel.$currentlySelectedModule", width, batch)
|
||||||
|
uiItems.forEach { it.render(frameDelta, batch, camera) }
|
||||||
|
}
|
||||||
|
catch (e: NullPointerException) {
|
||||||
|
// there will be NPE for first render frame, must ignore it to make the game continue working
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun dispose() {
|
override fun dispose() {
|
||||||
|
|||||||
Reference in New Issue
Block a user