diff --git a/shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/FinderSync.m b/shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/FinderSync.m index 822a2b639..c21c3a9ac 100644 --- a/shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/FinderSync.m +++ b/shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/FinderSync.m @@ -196,8 +196,12 @@ - (void)setResult:(NSString *)result forPath:(NSString*)path { - NSString *normalizedPath = [path decomposedStringWithCanonicalMapping]; - [[FIFinderSyncController defaultController] setBadgeIdentifier:result forURL:[NSURL fileURLWithPath:normalizedPath]]; + NSString *const normalizedPath = path.decomposedStringWithCanonicalMapping; + NSURL *const urlForPath = [NSURL fileURLWithPath:normalizedPath]; + if (urlForPath == nil) { + return; + } + [FIFinderSyncController.defaultController setBadgeIdentifier:result forURL:urlForPath]; } - (void)reFetchFileNameCacheForPath:(NSString*)path