mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
Merge pull request #4520 from nextcloud/bugfix/findersync-crash-fix
Fix crashing of finder sync extension caused by dispatch_source_cancel of nullptr
This commit is contained in:
commit
e84c6ef663
1 changed files with 11 additions and 4 deletions
|
@ -137,10 +137,17 @@
|
||||||
- (void)closeConnection
|
- (void)closeConnection
|
||||||
{
|
{
|
||||||
NSLog(@"Closing connection.");
|
NSLog(@"Closing connection.");
|
||||||
|
|
||||||
|
if(self.readSource) {
|
||||||
dispatch_source_cancel(self.readSource);
|
dispatch_source_cancel(self.readSource);
|
||||||
dispatch_source_cancel(self.writeSource);
|
|
||||||
self.readSource = nil;
|
self.readSource = nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(self.writeSource) {
|
||||||
|
dispatch_source_cancel(self.writeSource);
|
||||||
self.writeSource = nil;
|
self.writeSource = nil;
|
||||||
|
}
|
||||||
|
|
||||||
[self.inBuffer setLength:0];
|
[self.inBuffer setLength:0];
|
||||||
[self.outBuffer setLength: 0];
|
[self.outBuffer setLength: 0];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue