Explorar el Código

Merge pull request #25 from lchenay/patch-1

Ashley Mills hace 10 años
padre
commit
4d8784bc15
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      Reachability.swift

+ 3 - 2
Reachability.swift

@@ -149,8 +149,9 @@ public class Reachability: NSObject {
     
     
 
 
     public func stopNotifier() {
     public func stopNotifier() {
-
-        SCNetworkReachabilitySetCallback(reachabilityRef!, nil, nil)
+        if let reachabilityRef = reachabilityRef {
+            SCNetworkReachabilitySetCallback(reachabilityRef, nil, nil)
+        }
         reachabilityRef = nil
         reachabilityRef = nil
     }
     }