fixed f-droid variant nullability error

This commit is contained in:
Mariotaku Lee 2017-11-16 23:37:02 +08:00
parent 0311da4b82
commit a954d994a7
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
1 changed files with 3 additions and 4 deletions

View File

@ -49,11 +49,10 @@ class OpenStreetMapViewerFragment : BaseFragment(), Constants {
override fun onActivityCreated(savedInstanceState: Bundle?) {
super.onActivityCreated(savedInstanceState)
setHasOptionsMenu(true)
val args = arguments
val latitude = args.getDouble(EXTRA_LATITUDE, Double.NaN)
val longitude = args.getDouble(EXTRA_LONGITUDE, Double.NaN)
val latitude = arguments!!.getDouble(EXTRA_LATITUDE, Double.NaN)
val longitude = arguments!!.getDouble(EXTRA_LONGITUDE, Double.NaN)
if (latitude.isNaN() || longitude.isNaN()) {
activity.finish()
activity!!.finish()
return
}
this.latitude = latitude