comparison mac/dw.m @ 934:13384e89964c

Put in a bounds check just on a hunch when editing containers on Mac.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 26 Apr 2011 05:51:19 +0000
parents b19e6e55fc8e
children 114729f5aedc
comparison
equal deleted inserted replaced
933:b19e6e55fc8e 934:13384e89964c
1372 -(void)editCell:(id)input at:(int)row and:(int)col 1372 -(void)editCell:(id)input at:(int)row and:(int)col
1373 { 1373 {
1374 if(tvcols && input) 1374 if(tvcols && input)
1375 { 1375 {
1376 int index = (int)(row * [tvcols count]) + col; 1376 int index = (int)(row * [tvcols count]) + col;
1377 [data replaceObjectAtIndex:index withObject:input]; 1377 if(index < [data count])
1378 {
1379 [data replaceObjectAtIndex:index withObject:input];
1380 }
1378 } 1381 }
1379 } 1382 }
1380 -(void)removeRow:(int)row 1383 -(void)removeRow:(int)row
1381 { 1384 {
1382 if(tvcols) 1385 if(tvcols)