diff options
author | rowanbeentje <rowan@beent.je> | 2014-06-16 02:28:25 +0100 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2014-06-16 02:28:25 +0100 |
commit | 690c2fa83a5a3138bf4aa0fa862565c833b72d2a (patch) | |
tree | 799539bb55df6b2c4ff65709fd1add69fcc074ce /Source/SPTableContentDataSource.m | |
parent | ae239070319b0a8cacc8b17cdcb245ce29956759 (diff) | |
download | sequelpro-690c2fa83a5a3138bf4aa0fa862565c833b72d2a.tar.gz sequelpro-690c2fa83a5a3138bf4aa0fa862565c833b72d2a.tar.bz2 sequelpro-690c2fa83a5a3138bf4aa0fa862565c833b72d2a.zip |
Add a safety check within [SPCopyTable shouldUseFieldEditorForRow:column:] for use when loading tables, which may improve Issue #1925 and Issue #1902.
Diffstat (limited to 'Source/SPTableContentDataSource.m')
-rw-r--r-- | Source/SPTableContentDataSource.m | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/SPTableContentDataSource.m b/Source/SPTableContentDataSource.m index d02c666c..52170a2b 100644 --- a/Source/SPTableContentDataSource.m +++ b/Source/SPTableContentDataSource.m @@ -129,7 +129,12 @@ return [NSString stringWithFormat:@"0x%@", [value dataToHexString]]; } - if ([tableContentView shouldUseFieldEditorForRow:rowIndex column:columnIndex]) { + pthread_mutex_t *fieldEditorCheckLock = NULL; + if (isWorking) { + fieldEditorCheckLock = &tableValuesLock; + } + + if ([tableContentView shouldUseFieldEditorForRow:rowIndex column:columnIndex checkWithLock:fieldEditorCheckLock]) { return [value shortStringRepresentationUsingEncoding:[mySQLConnection stringEncoding]]; } @@ -167,7 +172,7 @@ // If the current cell should have been edited in a sheet, do nothing - field closing will have already // updated the field. - if ([tableContentView shouldUseFieldEditorForRow:rowIndex column:[[tableColumn identifier] integerValue]]) { + if ([tableContentView shouldUseFieldEditorForRow:rowIndex column:[[tableColumn identifier] integerValue] checkWithLock:NULL]) { return; } |