diff options
author | Max <post@wickenrode.com> | 2017-04-01 02:13:55 +0200 |
---|---|---|
committer | Max <post@wickenrode.com> | 2017-04-01 02:13:55 +0200 |
commit | 4ad2e844c29ea8f6c90d957d4ee2e20c13c4b492 (patch) | |
tree | e6491d620f26181b4f8d2a654ae0e41e099a1f18 | |
parent | 8239d138463e88e2d96a60a1f378f677893e5f6f (diff) | |
download | sequelpro-4ad2e844c29ea8f6c90d957d4ee2e20c13c4b492.tar.gz sequelpro-4ad2e844c29ea8f6c90d957d4ee2e20c13c4b492.tar.bz2 sequelpro-4ad2e844c29ea8f6c90d957d4ee2e20c13c4b492.zip |
Fix an exception when opening the „About“ window on OS X < 10.10
-rw-r--r-- | Source/SPAboutController.m | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/SPAboutController.m b/Source/SPAboutController.m index 0fa5a06c..712f311c 100644 --- a/Source/SPAboutController.m +++ b/Source/SPAboutController.m @@ -58,7 +58,8 @@ static NSString *SPShortVersionHashKey = @"SPVersionShortHash"; NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]; // If the version string has a prefix of 'Nightly' then this is obviously a nighly build. - BOOL isSnapshotBuild = [version containsString:SPSnapshotBuildIndicator]; + NSRange matchRange = [version rangeOfString:SPSnapshotBuildIndicator]; + BOOL isSnapshotBuild = (matchRange.location != NSNotFound); // Set the application name, but only include the major version if this is not a nightly build. [appNameVersionTextField setStringValue:isSnapshotBuild ? @"Sequel Pro" : [NSString stringWithFormat:@"Sequel Pro %@", version]]; |