mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-24 22:15:57 +03:00
Fix crashing of finder sync extension caused by dispatch_source_cancel of nullptr
Signed-off-by: Claudio Cambra <claudio.cambra@gmail.com>
This commit is contained in:
parent
85d8128021
commit
683e7794a3
1 changed files with 11 additions and 4 deletions
|
@ -137,10 +137,17 @@
|
|||
- (void)closeConnection
|
||||
{
|
||||
NSLog(@"Closing connection.");
|
||||
dispatch_source_cancel(self.readSource);
|
||||
dispatch_source_cancel(self.writeSource);
|
||||
self.readSource = nil;
|
||||
self.writeSource = nil;
|
||||
|
||||
if(self.readSource) {
|
||||
dispatch_source_cancel(self.readSource);
|
||||
self.readSource = nil;
|
||||
}
|
||||
|
||||
if(self.writeSource) {
|
||||
dispatch_source_cancel(self.writeSource);
|
||||
self.writeSource = nil;
|
||||
}
|
||||
|
||||
[self.inBuffer setLength:0];
|
||||
[self.outBuffer setLength: 0];
|
||||
|
||||
|
|
Loading…
Reference in a new issue