Fix call state edge cases.

pull/1/head
Matthew Chen 8 years ago
parent 93a4502ee4
commit b2f884b882

@ -1233,10 +1233,9 @@ private class SignalCallData: NSObject {
SwiftAssertIsOnMainThread(#function) SwiftAssertIsOnMainThread(#function)
guard let call = self.call else { guard let call = self.call else {
// This should never happen; return to a known good state. // This can happen if you tap the video button right after the other
owsFail("\(self.logTag) call was unexpectedly nil in \(#function)") // user hangs up.
OWSProdError(OWSAnalyticsEvents.callServiceCallMissing(), file: #file, function: #function, line: #line) Logger.warn("\(self.logTag) ignoring local video change; no call.")
handleFailedCurrentCall(error: CallError.assertionError(description: "\(self.logTag) call unexpectedly nil in \(#function)"))
return return
} }

Loading…
Cancel
Save