diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-09-27 09:21:14 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-09-27 09:21:14 +0000 |
commit | adf5d76a879d7e5474cf18843381f1dc553948a2 (patch) | |
tree | a5242c4489cb406a82d8a63cd71ff16307d795f7 | |
parent | 68a2f6250684d9bd51f6281c9bcbb20b10d26876 (diff) | |
download | sequelpro-adf5d76a879d7e5474cf18843381f1dc553948a2.tar.gz sequelpro-adf5d76a879d7e5474cf18843381f1dc553948a2.tar.bz2 sequelpro-adf5d76a879d7e5474cf18843381f1dc553948a2.zip |
• made SPCopyTable more independent against missing 'tableStorage' object
-rw-r--r-- | Source/SPCopyTable.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/SPCopyTable.m b/Source/SPCopyTable.m index 8c6f6525..e53e714a 100644 --- a/Source/SPCopyTable.m +++ b/Source/SPCopyTable.m @@ -177,7 +177,7 @@ NSInteger MENU_EDIT_COPY_AS_SQL = 2003; [[self delegate] addRowToDB]; if (newRow>=[[self delegate] numberOfRowsInTableView:self]) return YES; //check again. addRowToDB could reload the table and change the number of rows - if (column>=[tableStorage columnCount]) return YES; //the column count could change too + if (tableStorage && column>=[tableStorage columnCount]) return YES; //the column count could change too [self selectRowIndexes:[NSIndexSet indexSetWithIndex:newRow] byExtendingSelection:NO]; [self editColumn:column row:newRow withEvent:nil select:YES]; @@ -200,7 +200,7 @@ NSInteger MENU_EDIT_COPY_AS_SQL = 2003; [[self delegate] addRowToDB]; if (newRow>=[[self delegate] numberOfRowsInTableView:self]) return YES; // addRowToDB could reload the table and change the number of rows - if (column>=[tableStorage columnCount]) return YES; //the column count could change too + if (tableStorage && column>=[tableStorage columnCount]) return YES; //the column count could change too [self selectRowIndexes:[NSIndexSet indexSetWithIndex:newRow] byExtendingSelection:NO]; [self editColumn:column row:newRow withEvent:nil select:YES]; |