From e410ace9969b82b1419acef95b7728c93f05fd97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 20 May 2016 04:46:05 +0200 Subject: PlayMenu: dispose of GameRecord after deletion --- core/src/ch/asynk/rustanddust/menu/PlayMenu.java | 6 +++--- 1 file 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; } -- cgit v1.1-2-g2b99