From 00685e5dbcb9754dfb2e2fe1ab4e88f2fbf3a7f0 Mon Sep 17 00:00:00 2001 From: Rodeo Date: Tue, 9 Apr 2013 12:17:42 +0000 Subject: MacGui: fix a bug when saving a preset, the x264 system is used but the unparsed string is empty (all defaults). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5387 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/Controller.m | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'macosx') diff --git a/macosx/Controller.m b/macosx/Controller.m index 0b2d42d52..51c4be181 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -7016,8 +7016,15 @@ return YES; * bonus: set the unparsed options to make the preset compatible * with old HB versions */ - [preset setObject:[NSString stringWithUTF8String:fX264PresetsUnparsedUTF8String] - forKey:@"x264Option"]; + if (fX264PresetsUnparsedUTF8String != NULL) + { + [preset setObject:[NSString stringWithUTF8String:fX264PresetsUnparsedUTF8String] + forKey:@"x264Option"]; + } + else + { + [preset setObject:@"" forKey:@"x264Option"]; + } } /* FFmpeg (lavc) Option String */ -- cgit v1.2.3