From 3aa14dbf73e98a3a4bbd091a3b083e4e256bf92f Mon Sep 17 00:00:00 2001 From: dynaflash Date: Thu, 21 Feb 2008 13:20:21 +0000 Subject: [PATCH] MacGui: Fix issue where canceling the open source window, then re opening it and selecting a source or cancelling is could cause a crash. - Patch courtesy of Xeri git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1308 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/Controller.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 22d9ebfe4..75c536fbe 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -1053,8 +1053,6 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It - (void) browseSourcesDone: (NSOpenPanel *) sheet returnCode: (int) returnCode contextInfo: (void *) contextInfo { - [browsedSourceDisplayName release]; - /* we convert the sender content of contextInfo back into a variable called sender * mostly just for consistency for evaluation later */ @@ -1062,6 +1060,8 @@ static NSString * ChooseSourceIdentifier = @"Choose Source It /* User selected a file to open */ if( returnCode == NSOKButton ) { + /* Free display name allocated previously by this code */ + [browsedSourceDisplayName release]; NSString *scanPath = [[sheet filenames] objectAtIndex: 0]; /* we set the last searched source directory in the prefs here */ -- 2.40.0