VectorTileLayer: check tile source on detach by @Longri, fixes #175

This commit is contained in:
Emux 2016-09-21 13:09:36 +03:00
parent 5c370cf3ab
commit d937a4d6bb

View File

@ -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,