]> granicus.if.org Git - handbrake/commitdiff
MacGui: Fix issue where canceling the open source window, then re opening it and...
authordynaflash <dynaflashtech@gmail.com>
Thu, 21 Feb 2008 13:20:21 +0000 (13:20 +0000)
committerdynaflash <dynaflashtech@gmail.com>
Thu, 21 Feb 2008 13:20:21 +0000 (13:20 +0000)
- Patch courtesy of Xeri

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1308 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/Controller.mm

index 22d9ebfe4e7c05bef6a49f6fc84381f02652938f..75c536fbe03b61000bdcb49f8c4e7f26c81b1358 100644 (file)
@@ -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 */