From 69375fa0b8266d6515598563c57cbb9fc6af20ed Mon Sep 17 00:00:00 2001 From: Max Date: Sun, 13 Sep 2015 06:20:37 +0200 Subject: Fix an exception when pressing return in the table indexes view (fixes #2217) --- Source/SPTableView.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/SPTableView.m b/Source/SPTableView.m index 89550dd8..72535038 100644 --- a/Source/SPTableView.m +++ b/Source/SPTableView.m @@ -194,8 +194,9 @@ (![[[[self delegate] class] description] isEqualToString:@"SPConnectionController"])) { // Ensure that editing is permitted - if (![[self delegate] tableView:self shouldEditTableColumn:[[self tableColumns] objectAtIndex:0] row:[self selectedRow]]) return; - + if(![[self delegate] respondsToSelector:@selector(tableView:shouldEditTableColumn:row:)]) return; // disallow by default + if(![[self delegate] tableView:self shouldEditTableColumn:[[self tableColumns] objectAtIndex:0] row:[self selectedRow]]) return; + // Trigger a cell edit [self editColumn:0 row:[self selectedRow] withEvent:nil select:YES]; -- cgit v1.2.3