Fix GPXDatabase npe

This commit is contained in:
max-klaus 2019-11-05 12:25:20 +03:00
parent 5077be7471
commit 075256f41b

View file

@ -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();