Changeset 561 for trunk/Cocoa/Pester


Ignore:
Timestamp:
07/18/09 06:00:31 (15 years ago)
Author:
Nicholas Riley
Message:

PSSpeechAlert.m: Remove memory leak when voice not found; note that even this behavior isn't ideal.

File:
1 edited

Legend:

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

    r366 r561  
    7272{
    7373    NSMutableDictionary *plAlert = [[super propertyListRepresentation] mutableCopy];
    74     if (voice == nil)
     74    if (voice == nil) {
     75        // XXX should pick a different voice, not destroy the alert
     76        [plAlert release];
    7577        @throw [NSException exceptionWithName: NSInvalidArgumentException
    7678                                       reason: @"The selected voice is not available." userInfo: nil];
     79    }
    7780    [plAlert setObject: voice forKey: PLAlertVoice];
    7881    return [plAlert autorelease];
Note: See TracChangeset for help on using the changeset viewer.