aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-05-08 21:48:51 +0000
committerstuconnolly <stuart02@gmail.com>2012-05-08 21:48:51 +0000
commit62e4216b9e7ecbda9791f86feafbd1c7fbd031ce (patch)
treefa8adc4c8fdbb4b4094798a851f1dc4f3ade90f1 /Source
parent1dcef9b2044edd391d8bb3a16c18dd950c4e4956 (diff)
downloadsequelpro-62e4216b9e7ecbda9791f86feafbd1c7fbd031ce.tar.gz
sequelpro-62e4216b9e7ecbda9791f86feafbd1c7fbd031ce.tar.bz2
sequelpro-62e4216b9e7ecbda9791f86feafbd1c7fbd031ce.zip
Fix an error thrown when attempting to save favorites data to disk caused by the handling of null values. This also subsequetly caused an exception to be thrown when checking if any passwords needed updated.
Diffstat (limited to 'Source')
-rw-r--r--Source/SPConnectionController.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m
index bc1fe0c0..82b4e0c7 100644
--- a/Source/SPConnectionController.m
+++ b/Source/SPConnectionController.m
@@ -958,9 +958,9 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2,
{
id oldObject = [change objectForKey:NSKeyValueChangeOldKey];
id newObject = [change objectForKey:NSKeyValueChangeNewKey];
-
+
if (oldObject != newObject) {
- [[self selectedFavorite] setObject:(newObject) ? newObject : @"" forKey:keyPath];
+ [[self selectedFavorite] setObject:![newObject isNSNull] ? newObject : @"" forKey:keyPath];
// Save the new data to disk
[favoritesController saveFavorites];
@@ -1375,7 +1375,7 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2,
NSDictionary *oldFavorite = currentFavorite;
NSDictionary *newFavorite = [[[self selectedFavoriteNode] representedObject] nodeFavorite];
-
+
NSString *passwordValue;
NSString *oldKeychainName, *newKeychainName;
NSString *oldKeychainAccount, *newKeychainAccount;