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 <rickbarrette@gmail.com>
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user