From 075256f41b3d52f619ab99f025153c416522c60b Mon Sep 17 00:00:00 2001 From: max-klaus Date: Tue, 5 Nov 2019 12:25:20 +0300 Subject: [PATCH] Fix GPXDatabase npe --- OsmAnd/src/net/osmand/plus/GPXDatabase.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/GPXDatabase.java b/OsmAnd/src/net/osmand/plus/GPXDatabase.java index 087b93b188..c3e53caa65 100644 --- a/OsmAnd/src/net/osmand/plus/GPXDatabase.java +++ b/OsmAnd/src/net/osmand/plus/GPXDatabase.java @@ -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();