aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/SPConnectionController.h2
-rw-r--r--Source/SPConnectionController.m5
2 files changed, 4 insertions, 3 deletions
diff --git a/Source/SPConnectionController.h b/Source/SPConnectionController.h
index 456f8383..63df0551 100644
--- a/Source/SPConnectionController.h
+++ b/Source/SPConnectionController.h
@@ -171,7 +171,7 @@
NSImage *folderImage;
SPTreeNode *favoritesRoot;
- SPFavoriteNode *currentFavorite;
+ NSDictionary *currentFavorite;
SPFavoritesController *favoritesController;
SPFavoritesSortItem currentSortItem;
#endif
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m
index e40cb80a..350616ce 100644
--- a/Source/SPConnectionController.m
+++ b/Source/SPConnectionController.m
@@ -528,7 +528,7 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2,
}
// Store the selected favorite ID for use with the document on connection
- if ([fav objectForKey:SPFavoriteIDKey]) connectionKeychainID = [[fav objectForKey:SPFavoriteIDKey] copy];
+ if ([fav objectForKey:SPFavoriteIDKey]) connectionKeychainID = [[[fav objectForKey:SPFavoriteIDKey] stringValue] retain];
// And the same for the SSH password
connectionSSHKeychainItemName = [[keychain nameForSSHForFavoriteName:[fav objectForKey:SPFavoriteNameKey] id:[fav objectForKey:SPFavoriteIDKey]] retain];
@@ -1456,6 +1456,8 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2,
- (void)dealloc
{
+ [[NSNotificationCenter defaultCenter] removeObserver:self];
+
[keychain release];
[prefs release];
@@ -1475,7 +1477,6 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2,
if (connectionSSHKeychainItemAccount) [connectionSSHKeychainItemAccount release];
if (currentFavorite) [currentFavorite release], currentFavorite = nil;
- if (favoritesRoot) [favoritesRoot release], favoritesRoot = nil;
[super dealloc];
}