diff --git a/Source/common/SNTFileInfo.m b/Source/common/SNTFileInfo.m index 0f21e3ede..ae3763b9b 100644 --- a/Source/common/SNTFileInfo.m +++ b/Source/common/SNTFileInfo.m @@ -426,9 +426,12 @@ - (NSDictionary *)infoPlist { // `-[NSDictionary infoDictionary]` is heavily cached, changes to the Info.plist are not // realized. Use `CFBundleCopyInfoDictionaryInDirectory` instead, which does not appear to // cache. - d = CFBridgingRelease(CFBundleCopyInfoDictionaryInDirectory( - (__bridge CFURLRef)[NSURL fileURLWithPath:[self bundlePath]])); - if (d) { + NSString *bundlePath = [self bundlePath]; + if (bundlePath.length) { + d = CFBridgingRelease(CFBundleCopyInfoDictionaryInDirectory( + (__bridge CFURLRef)[NSURL fileURLWithPath:bundlePath])); + } + if (d.count) { self.infoDict = d; return self.infoDict; }