fix a crash with the URL window, and memory leak with the URL window, and update the "Open" button of the URL window when shown

This commit is contained in:
Mitchell Livingston
2011-02-11 03:17:36 +00:00
parent 32a54d1029
commit e5b8461919
2 changed files with 27 additions and 10 deletions

View File

@@ -1231,10 +1231,9 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
- (void) urlSheetDidEnd: (URLSheetWindowController *) controller url: (NSString *) urlString returnCode: (NSInteger) returnCode
{
if (returnCode != 1)
return;
if (returnCode == 1)
[self performSelectorOnMainThread: @selector(openURL:) withObject: urlString waitUntilDone: NO];
[self performSelectorOnMainThread: @selector(openURL:) withObject: urlString waitUntilDone: NO];
[controller release];
}