[Table Views] Add a safety check to cell creation
Cell creation may create some other type of view, somehow. No idea how. Signed-off-by: Christopher Snowhill <kode54@gmail.com>xcode15
parent
3d1be2ca0d
commit
812da2e331
|
@ -495,7 +495,7 @@ static void *playlistControllerContext = &playlistControllerContext;
|
|||
}
|
||||
|
||||
NSView *view = [tableView makeViewWithIdentifier:cellIdentifier owner:nil];
|
||||
if(view) {
|
||||
if(view && [view isKindOfClass:[NSTableCellView class]]) {
|
||||
NSTableCellView *cellView = (NSTableCellView *)view;
|
||||
NSRect frameRect = cellView.frame;
|
||||
frameRect.origin.y = 1;
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
}
|
||||
|
||||
NSView *view = [tableView makeViewWithIdentifier:cellIdentifier owner:nil];
|
||||
if(view) {
|
||||
if(view && [view isKindOfClass:[NSTableCellView class]]) {
|
||||
NSTableCellView *cellView = (NSTableCellView *)view;
|
||||
|
||||
if(cellView.textField) {
|
||||
|
|
|
@ -153,7 +153,7 @@
|
|||
}
|
||||
|
||||
NSView *view = [tableView makeViewWithIdentifier:cellIdentifier owner:nil];
|
||||
if(view) {
|
||||
if(view && [view isKindOfClass:[NSTableCellView class]]) {
|
||||
NSTableCellView *cellView = (NSTableCellView *)view;
|
||||
|
||||
if(cellView.textField) {
|
||||
|
|
Loading…
Reference in New Issue