aboutsummaryrefslogtreecommitdiffstats
path: root/TableDocument.m
diff options
context:
space:
mode:
Diffstat (limited to 'TableDocument.m')
-rw-r--r--TableDocument.m3
1 files changed, 3 insertions, 0 deletions
diff --git a/TableDocument.m b/TableDocument.m
index 32c53fcf..0beb77c4 100644
--- a/TableDocument.m
+++ b/TableDocument.m
@@ -258,6 +258,9 @@ reused when user hits the close button of the variablseSheet or of the createTab
// } else if ( [favoritesButton indexOfSelectedItem] == 2 ) {
// [favoritesButton selectItemWithTitle:selectedFavorite];
} else {*/
+ if ([[prefs objectForKey:@"favorites"] count] == 0)
+ return;
+
NSDictionary *favorite = [[prefs objectForKey:@"favorites"] objectAtIndex:[favoritesController selectionIndex]];
NSString *name = [favorite objectForKey:@"name"];
NSString *host = [favorite objectForKey:@"host"];