From e9d08a697eaf44b1c620706d55dd619f77d33af1 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Wed, 3 Mar 2010 21:55:22 +0000 Subject: - Fix an exception/crash when content edit errors occur and the user requests changs be discarded --- Source/TableContent.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/TableContent.m b/Source/TableContent.m index fc12dccf..4a69e67a 100644 --- a/Source/TableContent.m +++ b/Source/TableContent.m @@ -2136,11 +2136,11 @@ [tableContentView performSelector:@selector(keyDown:) withObject:[NSEvent keyEventWithType:NSKeyDown location:NSMakePoint(0,0) modifierFlags:0 timestamp:0 windowNumber:[tableWindow windowNumber] context:[NSGraphicsContext currentContext] characters:nil charactersIgnoringModifiers:nil isARepeat:NO keyCode:0x24] afterDelay:0.0]; } else { if ( !isEditingNewRow ) { - [tableValues replaceRowAtIndex:[tableContentView selectedRow] withRowContents:oldRow]; + [tableValues replaceRowAtIndex:currentlyEditingRow withRowContents:oldRow]; isEditingRow = NO; } else { tableRowsCount--; - [tableValues removeRowAtIndex:[tableContentView selectedRow]]; + [tableValues removeRowAtIndex:currentlyEditingRow]; isEditingRow = NO; isEditingNewRow = NO; } -- cgit v1.2.3