From 8383aedb64450436fc262d59b08a9c7988fd14d9 Mon Sep 17 00:00:00 2001 From: Alex Sytnyk Date: Wed, 12 Sep 2018 16:53:41 +0300 Subject: [PATCH] Fix #5785 --- OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java b/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java index a19bd37a5d..7a7af6063e 100644 --- a/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java +++ b/OsmAnd/src/net/osmand/plus/views/RulerControlLayer.java @@ -333,7 +333,8 @@ public class RulerControlLayer extends OsmandMapLayer { } private void updateData(RotatedTileBox tb, QuadPoint center) { - if (tb.getPixHeight() > 0 && tb.getPixWidth() > 0 && maxRadiusInDp > 0) { + if (tb.getPixHeight() > 0 && tb.getPixWidth() > 0 && maxRadiusInDp > 0 + && !Double.isNaN(tb.getLatitude()) && !Double.isNaN(tb.getLongitude())) { if (cacheCenter.y != center.y || cacheCenter.x != center.x) { cacheCenter = center; updateCenter(tb, center);