diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-05-20 04:46:05 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-05-20 04:46:05 +0200 |
commit | e410ace9969b82b1419acef95b7728c93f05fd97 (patch) | |
tree | 2c66fa442a639739fde3ebafb7c4128c5d0fed20 /core/src/ch/asynk/rustanddust/menu | |
parent | d363a20720f653ad4d304bd21e9b4488117e5456 (diff) | |
download | RustAndDust-e410ace9969b82b1419acef95b7728c93f05fd97.zip RustAndDust-e410ace9969b82b1419acef95b7728c93f05fd97.tar.gz |
PlayMenu: dispose of GameRecord after deletion
Diffstat (limited to 'core/src/ch/asynk/rustanddust/menu')
-rw-r--r-- | core/src/ch/asynk/rustanddust/menu/PlayMenu.java | 6 |
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; } |