Skip to content

Commit

Permalink
Fixed another potential crash related to the previous commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikepulaski committed Jan 12, 2021
1 parent 3ce8c40 commit 378f8da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Source/ARTRealtime.m
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,10 @@ - (void)updateWithErrorInfo:(nullable ARTErrorInfo *)errorInfo {

ARTEventListener *stateChangeEventListener = [self transitionSideEffects:stateChange];

[stateChangeEventListener startTimer];
// stateChangeEventListener may be nil if we're in a failed state
if (stateChangeEventListener != nil) {
[stateChangeEventListener startTimer];
}
}

- (ARTEventListener *)transitionSideEffects:(ARTConnectionStateChange *)stateChange {
Expand Down

0 comments on commit 378f8da

Please sign in to comment.