Fix GPXDatabase npe
This commit is contained in:
parent
5077be7471
commit
075256f41b
1 changed files with 3 additions and 0 deletions
|
@ -229,6 +229,9 @@ public class GPXDatabase {
|
|||
|
||||
SQLiteConnection openConnection(boolean readonly) {
|
||||
SQLiteConnection conn = context.getSQLiteAPI().getOrCreateDatabase(DB_NAME, readonly);
|
||||
if (conn == null) {
|
||||
return null;
|
||||
}
|
||||
if (conn.getVersion() < DB_VERSION) {
|
||||
if (readonly) {
|
||||
conn.close();
|
||||
|
|
Loading…
Reference in a new issue