diff --git a/Aerial/Source/Models/Time/TimeManagement.swift b/Aerial/Source/Models/Time/TimeManagement.swift
index 388cdef3..8b0706cd 100644
--- a/Aerial/Source/Models/Time/TimeManagement.swift
+++ b/Aerial/Source/Models/Time/TimeManagement.swift
@@ -162,20 +162,35 @@ class TimeManagement: NSObject {
switch preferences.solarMode {
case Preferences.SolarMode.official.rawValue:
- sunriseString = dateFormatter.string(from: (solar?.sunrise)!)
- sunsetString = dateFormatter.string(from: (solar?.sunset)!)
+ guard let sunrise = solar?.sunrise, let sunset = solar?.sunset else {
+ return (false, "Can't process your coordinates, please verify")
+ }
+ sunriseString = dateFormatter.string(from: sunrise)
+ sunsetString = dateFormatter.string(from: sunset)
case Preferences.SolarMode.strict.rawValue:
- sunriseString = dateFormatter.string(from: (solar?.strictSunrise)!)
- sunsetString = dateFormatter.string(from: (solar?.strictSunset)!)
+ guard let sunrise = solar?.strictSunrise, let sunset = solar?.strictSunset else {
+ return (false, "Can't process your coordinates, please verify")
+ }
+ sunriseString = dateFormatter.string(from: sunrise)
+ sunsetString = dateFormatter.string(from: sunset)
case Preferences.SolarMode.civil.rawValue:
- sunriseString = dateFormatter.string(from: (solar?.civilSunrise)!)
- sunsetString = dateFormatter.string(from: (solar?.civilSunset)!)
+ guard let sunrise = solar?.civilSunrise, let sunset = solar?.civilSunset else {
+ return (false, "Can't process your coordinates, please verify")
+ }
+ sunriseString = dateFormatter.string(from: sunrise)
+ sunsetString = dateFormatter.string(from: sunset)
case Preferences.SolarMode.nautical.rawValue:
- sunriseString = dateFormatter.string(from: (solar?.nauticalSunrise)!)
- sunsetString = dateFormatter.string(from: (solar?.nauticalSunset)!)
+ guard let sunrise = solar?.nauticalSunrise, let sunset = solar?.nauticalSunset else {
+ return (false, "Can't process your coordinates, please verify")
+ }
+ sunriseString = dateFormatter.string(from: sunrise)
+ sunsetString = dateFormatter.string(from: sunset)
default:
- sunriseString = dateFormatter.string(from: (solar?.astronomicalSunrise)!)
- sunsetString = dateFormatter.string(from: (solar?.astronomicalSunset)!)
+ guard let sunrise = solar?.astronomicalSunrise, let sunset = solar?.astronomicalSunset else {
+ return (false, "Can't process your coordinates, please verify")
+ }
+ sunriseString = dateFormatter.string(from: sunrise)
+ sunsetString = dateFormatter.string(from: sunset)
}
if preferences.solarMode == Preferences.SolarMode.official.rawValue ||
diff --git a/Resources/Info.plist b/Resources/Info.plist
index 9ae057af..610c7b8c 100644
--- a/Resources/Info.plist
+++ b/Resources/Info.plist
@@ -15,11 +15,11 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- 1.4.5beta3
+ 1.4.5beta4
CFBundleSignature
????
CFBundleVersion
- 1.4.5beta3
+ 1.4.5beta4
LSApplicationCategoryType
LSMinimumSystemVersion
diff --git a/Resources/PreferencesWindow.xib b/Resources/PreferencesWindow.xib
index 0c4454a8..a54a0684 100644
--- a/Resources/PreferencesWindow.xib
+++ b/Resources/PreferencesWindow.xib
@@ -297,7 +297,7 @@
-
+
@@ -402,7 +402,7 @@ is disabled
-
+
@@ -440,7 +440,7 @@ is disabled
-
+
@@ -461,7 +461,7 @@ is disabled
-