tchegito / zildo

The Land of Alembrume
GNU Lesser General Public License v3.0
4 stars 1 forks source link

[2.55] NPE backing up game #171

Closed tchegito closed 5 years ago

tchegito commented 5 years ago
java.lang.NullPointerException: 
  at zildo.monde.Game.serialize (Game.java:132)
  at zildo.client.gui.menu.SaveGameMenu.saveGame (SaveGameMenu.java:165)
  at zildo.client.gui.menu.SaveGameMenu.saveOnCrash (SaveGameMenu.java:179)
  at com.alembrum.OpenGLRenderer.onDrawFrame (OpenGLRenderer.java:121)
  at android.opengl.GLSurfaceView$GLThread.guardedRun (GLSurfaceView.java:1522)
  at android.opengl.GLSurfaceView$GLThread.run (GLSurfaceView.java:1239)
tchegito commented 5 years ago

It happens when game has already crashed (most likely with issue #170 which happened with or withour hero in the logs). Then we try to back up the game, although no hero is present.

In this case, we shouldn't try to back up.

tchegito commented 5 years ago

[Fixed in 2.56]

Now, we don't try to back up if hero isn't present yet.

7e11f4799f140c3e4dc4a0deaad574b1f3c3c839