From 7638f342902d27d39c48f0d2802ce9c347ab55ae Mon Sep 17 00:00:00 2001 From: Ricky Barrette Date: Thu, 31 May 2012 11:37:29 -0400 Subject: [PATCH] I added a check to see if the database is open before creating/showing the new game dialog. closes #19 Signed-off-by: Ricky Barrette --- .../com/TwentyCode/android/ExaltedDice/GameListActivity.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ExaltedDice/src/com/TwentyCode/android/ExaltedDice/GameListActivity.java b/ExaltedDice/src/com/TwentyCode/android/ExaltedDice/GameListActivity.java index 191b1e7..218618b 100644 --- a/ExaltedDice/src/com/TwentyCode/android/ExaltedDice/GameListActivity.java +++ b/ExaltedDice/src/com/TwentyCode/android/ExaltedDice/GameListActivity.java @@ -34,6 +34,8 @@ public class GameListActivity extends Activity implements OnClickListener, Datab @Override public void onClick(View v) { + if(!mDb.isOpen()) + mDb = new Database(this, this); new NewGameDialog(this, mDb).show(); }