diff options
-rw-r--r-- | Source/SPTableContent.m | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index 5f5de871..c4eb9f57 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -2645,8 +2645,11 @@ return YES; } - // Save any edits which have been made but not saved to the table yet. - [[tableDocumentInstance parentWindow] endEditingFor:nil]; + // Save any edits which have been made but not saved to the table yet; + // but not for any NSSearchFields which could cause a crash for undo, redo. + if([[[tableDocumentInstance parentWindow] firstResponder] respondsToSelector:@selector(delegate)] + && ![[[[tableDocumentInstance parentWindow] firstResponder] delegate] isKindOfClass:[NSSearchField class]]) + [[tableDocumentInstance parentWindow] endEditingFor:nil]; // If no rows are currently being edited, or a save is in progress, return success at once. if (!isEditingRow || isSavingRow) return YES; |