From b0f155a377b887d29b7c2deb0f1916b584ec4f0e Mon Sep 17 00:00:00 2001 From: Emux Date: Sun, 9 Dec 2018 15:02:49 +0200 Subject: [PATCH] MapScaleBarLayer: check if scale bar is destroyed, fix #611 --- vtm/src/org/oscim/scalebar/MapScaleBarLayer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vtm/src/org/oscim/scalebar/MapScaleBarLayer.java b/vtm/src/org/oscim/scalebar/MapScaleBarLayer.java index 2a533688..a4235794 100644 --- a/vtm/src/org/oscim/scalebar/MapScaleBarLayer.java +++ b/vtm/src/org/oscim/scalebar/MapScaleBarLayer.java @@ -1,5 +1,5 @@ /* - * Copyright 2016 devemux86 + * Copyright 2016-2018 devemux86 * * This program is free software: you can redistribute it and/or modify it under the * terms of the GNU Lesser General Public License as published by the Free Software @@ -42,6 +42,9 @@ public class MapScaleBarLayer extends Layer implements Map.UpdateListener { if (e == Map.UPDATE_EVENT) return; + if (mapScaleBar.mapScaleBitmap == null) + return; + if (!mapScaleBar.isVisible()) return;