From 87554d4ffacef563921ef2d0c7fdf409bb2a01b2 Mon Sep 17 00:00:00 2001 From: ivanPyrohivskyi Date: Fri, 20 Sep 2024 17:24:16 +0300 Subject: [PATCH] Fit polygon on map --- .../net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java index 55b1574e0ea..edf847b1b51 100644 --- a/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java +++ b/OsmAnd/src/net/osmand/plus/mapcontextmenu/MapContextMenuFragment.java @@ -2283,6 +2283,9 @@ private boolean fitPolygon() { return false; } QuadRect r = ro.getRectLatLon(); + if (r == null) { + return false; + } getMapActivity().getMapView(); RotatedTileBox tb = getMapActivity().getMapView().getCurrentRotatedTileBox().copy(); int tileBoxWidthPx = 0;