Changeset 3903

Show
Ignore:
Timestamp:
03/15/06 21:31:05 (3 years ago)
Author:
morris
Message:

Add nil check to avoid exception when changing topic after midnight

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • WiredClient/trunk/WCChat.m

    r3866 r3903  
    130130 
    131131- (void)_updateTopic { 
    132         [_topicTextField setToolTip:[_topic topic]]; 
    133         [_topicTextField setStringValue:[_topic topic]]; 
    134         [_topicNickTextField setStringValue:[NSSWF: 
    135                 NSLS(@"%@ %C %@", @"Chat topic set by (nick, time)"), 
    136                 [_topic nick], 
    137                 0x2014, 
    138                 [[_topic date] commonDateStringWithSeconds:NO relative:YES capitalized:YES]]]; 
     132        if(_topic) { 
     133                [_topicTextField setToolTip:[_topic topic]]; 
     134                [_topicTextField setStringValue:[_topic topic]]; 
     135                [_topicNickTextField setStringValue:[NSSWF: 
     136                        NSLS(@"%@ %C %@", @"Chat topic set by (nick, time)"), 
     137                        [_topic nick], 
     138                        0x2014, 
     139                        [[_topic date] commonDateStringWithSeconds:NO relative:YES capitalized:YES]]]; 
     140        } 
    139141} 
    140142