Changeset 446

Show
Ignore:
Timestamp:
03/ 9/08 12:13:29 PM (9 months ago)
Author:
nicholas
Message:

Fixed -[NSCFString characterAtIndex:]: Range or index out of bounds when clicking outside text of Web page.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ICeCoffEE/ICeCoffEE/ICeCoffEEWebKit.m

    r443 r446  
    9999        NSLog(@"elementDict: %@", elementDict); 
    100100        NSAssert([elementDict count] != 0, ICCF_LocalizedString(@"Sorry, ICeCoffEE was unable to find anything to select")); 
    101  
     101         
    102102        WebCoreBridge *bridge = [(WebHTMLView *)self _bridge]; 
    103103 
     
    125125            // XXX at some point, characterIndexForPoint: wasn't implemented, so this will fail 
    126126            NSRange range = [ICeCoffEETrigger rangeForEvent: downEvent onTarget: (NSView<NSTextInput> *)self]; 
     127             
     128            NSAssert(range.location != NSNotFound, ICCF_LocalizedString(@"Sorry, ICeCoffEE was unable to find anything to select")); 
    127129 
    128130            // XXX limit to a reasonable size