aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPPreferencesUpgrade.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/SPPreferencesUpgrade.m b/Source/SPPreferencesUpgrade.m
index bfdd0f47..a4e15c6b 100644
--- a/Source/SPPreferencesUpgrade.m
+++ b/Source/SPPreferencesUpgrade.m
@@ -316,7 +316,7 @@ void SPMigrateConnectionFavoritesData(void)
NSMutableArray *favorites = [[NSMutableArray alloc] initWithArray:[prefs objectForKey:SPOldFavoritesKey]];
// Change the last used favorite and default favorite's indexes to be ID based
- if (![prefs objectForKey:SPLastFavoriteID]) {
+ if (![prefs objectForKey:SPLastFavoriteID] && [favorites count]) {
NSInteger lastFavoriteIndex = [prefs integerForKey:@"LastFavoriteIndex"];
NSInteger defaultFavoriteIndex = [prefs integerForKey:SPDefaultFavorite];