MapTile.unlock NullPointerException, fix #539

This commit is contained in:
Emux 2018-05-08 14:26:56 +03:00
parent 516b18bdef
commit b9f989a454
No known key found for this signature in database
GPG Key ID: 64ED9980896038C3

View File

@ -1,6 +1,6 @@
/*
* Copyright 2012, 2013 Hannes Janetzek
* Copyright 2017 devemux86
* Copyright 2017-2018 devemux86
*
* This file is part of the OpenScienceMap project (http://www.opensciencemap.org).
*
@ -240,14 +240,12 @@ public class MapTile extends Tile {
if (--locked > 0)
return;
TileNode parent = node.parent;
if ((proxy & PROXY_PARENT) != 0)
parent.item.refs--;
node.parent.item.refs--;
if ((proxy & PROXY_GRAMPA) != 0)
node.parent.parent.item.refs--;
if ((proxy & PROXY_GRAMPA) != 0) {
parent = parent.parent;
parent.item.refs--;
}
for (int i = 0; i < 4; i++) {
if ((proxy & (1 << i)) != 0)
node.child(i).refs--;