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