Permalink
Browse files

Correctly deal with no row selection

  • Loading branch information...
1 parent 7c9f847 commit 0fa06728b954fe372187af75728fc01f52d1051b @beelsebob committed Mar 30, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 Stash/STAMainWindowController.m
@@ -264,8 +264,8 @@ - (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView
- (void)tableViewSelectionDidChange:(NSNotification *)notification
{
- NSUInteger row = [[self resultsTable] selectedRow];
- if (row < [[self sortedResults] count])
+ NSInteger row = [[self resultsTable] selectedRow];
+ if (row < [[self sortedResults] count] && row != -1)
{
STASymbol *symbol = [[self sortedResults] objectAtIndex:row];
NSURLRequest *request = [NSURLRequest requestWithURL:[symbol url]];

0 comments on commit 0fa0672

Please sign in to comment.