Fix NPE
This commit is contained in:
parent
a06bbb4082
commit
7bbf63b221
1 changed files with 8 additions and 4 deletions
|
@ -963,11 +963,15 @@ public class MapContextMenuFragment extends BaseOsmAndFragment implements Downlo
|
|||
|
||||
public void updateMapCenter(LatLon mapCenter) {
|
||||
customMapCenter = true;
|
||||
menu.setMapCenter(mapCenter);
|
||||
if (menu != null) {
|
||||
menu.setMapCenter(mapCenter);
|
||||
}
|
||||
this.mapCenter = mapCenter;
|
||||
RotatedTileBox box = map.getCurrentRotatedTileBox().copy();
|
||||
origMarkerX = box.getCenterPixelX();
|
||||
origMarkerY = box.getCenterPixelY();
|
||||
if (map != null) {
|
||||
RotatedTileBox box = map.getCurrentRotatedTileBox().copy();
|
||||
origMarkerX = box.getCenterPixelX();
|
||||
origMarkerY = box.getCenterPixelY();
|
||||
}
|
||||
}
|
||||
|
||||
private void enableDisableButtons(View buttonView, TextView button, boolean enabled) {
|
||||
|
|
Loading…
Reference in a new issue