From b3a7c55f2a42bda83d507666571e290b1d642df5 Mon Sep 17 00:00:00 2001 From: Rodeo Date: Sun, 19 Jan 2014 21:34:55 +0000 Subject: MacGui: fixy a crash when opening an external SRT file. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5985 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/Controller.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macosx/Controller.m b/macosx/Controller.m index b3ab256c0..a999b1526 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -6055,7 +6055,7 @@ the user is using "Custom" settings by determining the sender*/ [panel setCanChooseDirectories: NO ]; NSURL *sourceDirectory; - if ([[NSUserDefaults standardUserDefaults] stringForKey:@"LastSrtImportDirectoryURL"]) + if ([[NSUserDefaults standardUserDefaults] URLForKey:@"LastSrtImportDirectoryURL"]) { sourceDirectory = [[NSUserDefaults standardUserDefaults] URLForKey:@"LastSrtImportDirectoryURL"]; } @@ -6080,7 +6080,7 @@ the user is using "Custom" settings by determining the sender*/ { NSURL *importSrtFileURL = [sheet URL]; NSURL *importSrtDirectory = [importSrtFileURL URLByDeletingLastPathComponent]; - [[NSUserDefaults standardUserDefaults] setObject:importSrtDirectory forKey:@"LastSrtImportDirectoryURL"]; + [[NSUserDefaults standardUserDefaults] setURL:importSrtDirectory forKey:@"LastSrtImportDirectoryURL"]; /* now pass the string off to fSubtitlesDelegate to add the srt file to the dropdown */ [fSubtitlesDelegate createSubtitleSrtTrack:importSrtFileURL]; -- cgit v1.2.3