VectorTileLayer: check tile source on detach by @Longri, fixes #175
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright 2013 Hannes Janetzek
|
||||
* Copyright 2016 Longri
|
||||
*
|
||||
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
|
||||
*
|
||||
@@ -175,7 +176,8 @@ public class VectorTileLayer extends TileLayer {
|
||||
@Override
|
||||
public void onDetach() {
|
||||
super.onDetach();
|
||||
mTileSource.close();
|
||||
if (mTileSource != null)
|
||||
mTileSource.close();
|
||||
}
|
||||
|
||||
public void callThemeHooks(MapTile tile, RenderBuckets layers, MapElement element,
|
||||
|
||||
Reference in New Issue
Block a user