diff options
author | Damiano Galassi <[email protected]> | 2019-04-05 19:46:42 +0200 |
---|---|---|
committer | Damiano Galassi <[email protected]> | 2019-04-05 19:46:42 +0200 |
commit | d7ac67abc802ff09c106057cb3eb327d0d0716a6 (patch) | |
tree | 5d4bdafd71ee7742694d6e210baab18ff0486093 /macosx/HBCore.m | |
parent | 6f5d33cf7cd54642e01158d40546bea9fe60941d (diff) |
MacGui: fail gracefully when trying to encode to a not available disk under the sandbox.
Diffstat (limited to 'macosx/HBCore.m')
-rw-r--r-- | macosx/HBCore.m | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/macosx/HBCore.m b/macosx/HBCore.m index 40117d4f5..8a5c91230 100644 --- a/macosx/HBCore.m +++ b/macosx/HBCore.m @@ -505,15 +505,18 @@ typedef void (^HBCoreCleanupHandler)(void); - (void)startProgressReporting:(NSURL *)fileURL { - NSDictionary *userInfo = @{NSProgressFileURLKey : fileURL}; + if (fileURL) + { + NSDictionary *userInfo = @{NSProgressFileURLKey : fileURL}; - self.progress = [[NSProgress alloc] initWithParent:nil userInfo:userInfo]; - self.progress.totalUnitCount = 100; - self.progress.kind = NSProgressKindFile; - self.progress.pausable = NO; - self.progress.cancellable = NO; + self.progress = [[NSProgress alloc] initWithParent:nil userInfo:userInfo]; + self.progress.totalUnitCount = 100; + self.progress.kind = NSProgressKindFile; + self.progress.pausable = NO; + self.progress.cancellable = NO; - [self.progress publish]; + [self.progress publish]; + } } - (void)stopProgressReporting |