Ignore:
Timestamp:
11/10/02 11:33:45 (22 years ago)
Author:
Nicholas Riley
Message:

Pester 1.1a2 (again).

NJRQTMediaPopUpButton: Don't add in -_addRecentMediaAtPath if title or path is nil.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cocoa/Pester/Source/NJRQTMediaPopUpButton.m

    r45 r47  
    5151    NSString *title = [[NSFileManager defaultManager] displayNameAtPath: path];
    5252    NSMenu *menu = [self menu];
    53     NSMenuItem *item = [menu insertItemWithTitle: title action: @selector(_aliasSelected:) keyEquivalent: @"" atIndex: [menu indexOfItem: otherItem] + 1];
     53    NSMenuItem *item;
     54    if (title == nil || path == nil) return nil;
     55    item = [menu insertItemWithTitle: title action: @selector(_aliasSelected:) keyEquivalent: @"" atIndex: [menu indexOfItem: otherItem] + 1];
    5456    [item setTarget: self];
    5557    [item setRepresentedObject: alias];
Note: See TracChangeset for help on using the changeset viewer.