Android samples: fix scale bar check on exit #32

This commit is contained in:
Emux 2017-03-22 21:34:52 +02:00
parent b32692942f
commit 18d8e18bdf
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
/*
* Copyright 2013 Hannes Janetzek
* Copyright 2016 devemux86
* Copyright 2016-2017 devemux86
* Copyright 2016 Andrey Novikov
*
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
@ -71,7 +71,8 @@ public class LayerGroupActivity extends BaseMapActivity {
@Override
protected void onDestroy() {
mapScaleBar.destroy();
if (mapScaleBar != null)
mapScaleBar.destroy();
super.onDestroy();
}

View File

@ -58,7 +58,8 @@ public class MapsforgeMapActivity extends MapActivity {
@Override
protected void onDestroy() {
mMapScaleBar.destroy();
if (mMapScaleBar != null)
mMapScaleBar.destroy();
super.onDestroy();
}