spiceio: fix crash on macOS

This commit is contained in:
osy 2024-02-25 21:30:45 -08:00
parent 8a7a531a7e
commit 0b7110edcc
1 changed files with 3 additions and 1 deletions

View File

@ -204,7 +204,9 @@ NSString *const kUTMErrorDomain = @"com.utmapp.utm";
- (void)spiceDisconnected:(CSConnection *)connection {
NSAssert(connection == self.spiceConnection, @"Unknown connection");
self.isConnected = NO;
[self.delegate spiceDidDisconnect];
if ([self.delegate respondsToSelector:@selector(spiceDidDisconnect)]) {
[self.delegate spiceDidDisconnect];
}
}
- (void)spiceError:(CSConnection *)connection code:(CSConnectionError)code message:(nullable NSString *)message {