Skip to content

Commit

Permalink
VectorTileLayer: check tile source on detach by @Longri, fixes opensc…
Browse files Browse the repository at this point in the history
  • Loading branch information
devemux86 committed Sep 21, 2016
1 parent 5c370cf commit d937a4d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vtm/src/org/oscim/layers/tile/vector/VectorTileLayer.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright 2013 Hannes Janetzek
* Copyright 2016 Longri
*
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
*
Expand Down Expand Up @@ -175,7 +176,8 @@ public void addHook(TileLoaderThemeHook h) {
@Override
public void onDetach() {
super.onDetach();
mTileSource.close();
if (mTileSource != null)
mTileSource.close();
}

public void callThemeHooks(MapTile tile, RenderBuckets layers, MapElement element,
Expand Down

0 comments on commit d937a4d

Please sign in to comment.