Android samples: fix scale bar check on exit

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
vtm-android-example/src/org/oscim/android/test

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

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