fix crash

This commit is contained in:
Saúl Ibarra Corretgé 2017-09-28 21:21:16 +02:00
parent da5f1081f2
commit dcedb6334e
1 changed files with 2 additions and 4 deletions

View File

@ -97,9 +97,7 @@ class ExtensionDelegate: NSObject, WCSessionDelegate, WKExtensionDelegate {
currentController.pushController(withName: "InCallController", context: context)
}
}
} else {
// This must be InCallController
let controller = WKExtension.shared().visibleInterfaceController as! InCallController
} else if let controller = WKExtension.shared().visibleInterfaceController as? InCallController {
if conferenceURL == "NULL" {
DispatchQueue.main.async {
controller.popToRootController()
@ -107,7 +105,7 @@ class ExtensionDelegate: NSObject, WCSessionDelegate, WKExtensionDelegate {
} else {
// Update muted state
controller.updateMutedButton(withMuted: micMuted.boolValue)
}
}
}
}