aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableContent.m
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-07-20 01:18:11 +0200
committerMax <post@wickenrode.com>2015-07-20 01:18:11 +0200
commitfeff69bdf2cb1148dc2930a9de7976c80c939632 (patch)
tree6b5b3667d9c6b1f6931274bfd3cc6b056da292c9 /Source/SPTableContent.m
parentc1580fb4e585a16348b59641ba0e1ebe19b99062 (diff)
downloadsequelpro-feff69bdf2cb1148dc2930a9de7976c80c939632.tar.gz
sequelpro-feff69bdf2cb1148dc2930a9de7976c80c939632.tar.bz2
sequelpro-feff69bdf2cb1148dc2930a9de7976c80c939632.zip
Remove an unbalanced call to -[SPDatabaseDocument endTask] which caused misbehaviour if loading a table failed (fixes #2180)
Note: I suspect this was a leftover from refactoring but I can't rule out the possibility of a code path where this was desired.
Diffstat (limited to 'Source/SPTableContent.m')
-rw-r--r--Source/SPTableContent.m9
1 files changed, 3 insertions, 6 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m
index 905e9f48..0be238ba 100644
--- a/Source/SPTableContent.m
+++ b/Source/SPTableContent.m
@@ -314,17 +314,14 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper
// If no table has been supplied, clear the table interface and return
if (!aTable || [aTable isEqualToString:@""]) {
- [self performSelectorOnMainThread:@selector(setTableDetails:) withObject:nil waitUntilDone:YES];
-
+ [[self onMainThread] setTableDetails:nil];
return;
}
// Attempt to retrieve the table encoding; if that fails (indicating an error occurred
// while retrieving table data), or if the Rows variable is null, clear and return
if (![tableDataInstance tableEncoding] || [[[tableDataInstance statusValues] objectForKey:@"Rows"] isNSNull]) {
- [self performSelectorOnMainThread:@selector(setTableDetails:) withObject:nil waitUntilDone:YES];
- [tableDocumentInstance performSelectorOnMainThread:@selector(endTask) withObject:nil waitUntilDone:YES];
-
+ [[self onMainThread] setTableDetails:nil];
return;
}
@@ -338,7 +335,7 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper
[tableDataInstance columnNames], @"columnNames",
[tableDataInstance getConstraints], @"constraints",
nil];
- [self performSelectorOnMainThread:@selector(setTableDetails:) withObject:tableDetails waitUntilDone:YES];
+ [[self onMainThread] setTableDetails:tableDetails];
// Init copyTable with necessary information for copying selected rows as SQL INSERT
[tableContentView setTableInstance:self withTableData:tableValues withColumns:dataColumns withTableName:selectedTable withConnection:mySQLConnection];