From 21e3f9ff8146da7dc484fe6747d520cac5227e36 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Sat, 27 Apr 2013 01:26:01 +0200 Subject: [PATCH] Fix NPE --- OsmAnd/src/net/osmand/plus/srtmplugin/HillshadeLayer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/srtmplugin/HillshadeLayer.java b/OsmAnd/src/net/osmand/plus/srtmplugin/HillshadeLayer.java index 15f5a81bf7..7bc5de1f42 100644 --- a/OsmAnd/src/net/osmand/plus/srtmplugin/HillshadeLayer.java +++ b/OsmAnd/src/net/osmand/plus/srtmplugin/HillshadeLayer.java @@ -94,7 +94,8 @@ public class HillshadeLayer extends MapTileLayer { do { String filename = cursor.getString(0); long lastModified = cursor.getLong(1); - if(rs.containsKey(filename) && lastModified == fileModified.get(filename).longValue()) { + Long read = fileModified.get(filename); + if(rs.containsKey(filename) && read != null && lastModified == read.longValue()) { int left = cursor.getInt(2); int right = cursor.getInt(3); int top = cursor.getInt(4);