summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2016-05-20 04:46:05 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2016-05-20 04:46:05 +0200
commite410ace9969b82b1419acef95b7728c93f05fd97 (patch)
tree2c66fa442a639739fde3ebafb7c4128c5d0fed20
parentd363a20720f653ad4d304bd21e9b4488117e5456 (diff)
downloadRustAndDust-e410ace9969b82b1419acef95b7728c93f05fd97.zip
RustAndDust-e410ace9969b82b1419acef95b7728c93f05fd97.tar.gz
PlayMenu: dispose of GameRecord after deletion
-rw-r--r--core/src/ch/asynk/rustanddust/menu/PlayMenu.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/src/ch/asynk/rustanddust/menu/PlayMenu.java b/core/src/ch/asynk/rustanddust/menu/PlayMenu.java
index 8babc57..1fc206f 100644
--- a/core/src/ch/asynk/rustanddust/menu/PlayMenu.java
+++ b/core/src/ch/asynk/rustanddust/menu/PlayMenu.java
@@ -59,11 +59,11 @@ public class PlayMenu extends Patch implements MenuCtrl.Panel
public MenuCtrl.MenuType postAnswer(boolean ok)
{
if (!notImplemented && ok) {
- game.db.deleteGame(GameRecord.remove(getList().getIdx()).id);
+ GameRecord r = GameRecord.remove(getList().getIdx());
+ game.db.deleteGame(r.id);
+ r.dispose();
getList().unselect();
showBtns(false);
- if (GameRecord.list.size() <= 0)
- return MenuCtrl.MenuType.NEW_GAME;
}
return MenuCtrl.MenuType.NONE;
}