read some invalid memory why don't you

master
Jordan Orelli 8 years ago
parent 1515a0d950
commit 5cedb973de

@ -20,7 +20,22 @@
- (id) tableView:(NSTableView *)view objectValueForTableColumn:(NSTableColumn *)column row:(NSInteger) row {
NSLog(@"[RequestHistory] objectValueForTableColumn: %@ row: %zd", column, row);
return [[self items] objectAtIndex:row];
NSValue *val = [[self items] objectAtIndex:row];
if (!val) {
return nil;
}
RequestMeta meta;
[val getValue:&meta];
if ([[column identifier] isEqualToString:@"id"]) {
return [NSNumber numberWithInt:meta.seq];
} else if ([[column identifier] isEqualToString:@"status"]) {
return @"???";
} else if ([[column identifier] isEqualToString:@"path"]) {
return [NSString stringWithUTF8String:meta.path];
} else {
return @"fuck";
}
}
- (void) addRequestItem:(RequestMeta *)meta {

Loading…
Cancel
Save