]> git.sesse.net Git - vlc/commitdiff
macosx: resume playback: fix memleak
authorDavid Fuhrmann <dfuhrmann@videolan.org>
Sun, 28 Dec 2014 16:22:14 +0000 (17:22 +0100)
committerDavid Fuhrmann <dfuhrmann@videolan.org>
Tue, 30 Dec 2014 15:10:49 +0000 (16:10 +0100)
modules/gui/macosx/playlist.m

index 8e61e70a3739529a38949e7ec423536130640fcc..fb7b76322fa413699c55e7f526b6d256b2d14ebc 100644 (file)
     NSInteger returnValue = NSAlertErrorReturn;
     if (settingValue == 0) { // ask
 
+        char *psz_title_name = input_item_GetTitleFbName(p_item);
+        NSString *o_title = toNSStr(psz_title_name);
+        free(psz_title_name);
+
         currentResumeTimeout = 6;
         NSString *o_restartButtonLabel = _NS("Restart playback");
         o_restartButtonLabel = [o_restartButtonLabel stringByAppendingFormat:@" (%d)", currentResumeTimeout];
-        NSAlert *theAlert = [NSAlert alertWithMessageText:_NS("Continue playback?") defaultButton:_NS("Continue") alternateButton:o_restartButtonLabel otherButton:_NS("Always continue") informativeTextWithFormat:_NS("Playback of \"%@\" will continue at %@"), [NSString stringWithUTF8String:input_item_GetTitleFbName(p_item)], [[VLCStringUtility sharedInstance] stringForTime:lastPosition.intValue]];
+        NSAlert *theAlert = [NSAlert alertWithMessageText:_NS("Continue playback?") defaultButton:_NS("Continue") alternateButton:o_restartButtonLabel otherButton:_NS("Always continue") informativeTextWithFormat:_NS("Playback of \"%@\" will continue at %@"), o_title, [[VLCStringUtility sharedInstance] stringForTime:lastPosition.intValue]];
 
         NSTimer *timer = [NSTimer timerWithTimeInterval:1
                                                  target:self