From 08f8a0cc4686e2c73edd6bf7522cd252c614f446 Mon Sep 17 00:00:00 2001 From: Hannes Juutilainen Date: Fri, 10 Aug 2018 11:23:25 +0300 Subject: [PATCH] Set NSFileManager delegate back to nil once copying is done. Otherwise the next operation by NSFileManager will try to use the deallocated instance and crash. --- MunkiAdmin/NSOperation Subclasses/MAFileCopyOperation.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MunkiAdmin/NSOperation Subclasses/MAFileCopyOperation.m b/MunkiAdmin/NSOperation Subclasses/MAFileCopyOperation.m index ed1213d..e079f2c 100644 --- a/MunkiAdmin/NSOperation Subclasses/MAFileCopyOperation.m +++ b/MunkiAdmin/NSOperation Subclasses/MAFileCopyOperation.m @@ -63,7 +63,7 @@ -(void)main { } else { DDLogError(@"%@: Copy failed with error: %@", filename, [copyError description]); } - + [fm setDelegate:nil]; } } @catch(...) {