MapScaleBarLayer: check if scale bar is destroyed, fix #611

This commit is contained in:
Emux 2018-12-09 15:02:49 +02:00
parent 62132937da
commit b0f155a377
No known key found for this signature in database
GPG Key ID: 64ED9980896038C3

View File

@ -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 * 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 * 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) if (e == Map.UPDATE_EVENT)
return; return;
if (mapScaleBar.mapScaleBitmap == null)
return;
if (!mapScaleBar.isVisible()) if (!mapScaleBar.isVisible())
return; return;