fix #4289: NPE in switchMyLocationButton