opensciencemap / vtm

a vector-tile map library written in java - running on android, desktop and within the browser
GNU Lesser General Public License v3.0
238 stars 176 forks source link

NPE in VectorTileLayer #128

Open stleusc opened 9 years ago

stleusc commented 9 years ago
    @Override
    public void onDetach() {
        super.onDetach();
            if (mTileSource != null) <--- this should be added
            mTileSource.close();
    }

I got some crashreports of NPE when onDetach is called, for some reason mTileSource is null, does not hurt to check for it... Maybe you can add this simple fix. Thanks!