From 65274c64811df91e83f6552bfcda852704df952d Mon Sep 17 00:00:00 2001 From: dynaflash Date: Sun, 22 Nov 2009 06:20:01 +0000 Subject: MacGui: Add check for audio == null for > 1 audio track to prevent crash for > 1 audio tracks and sources with no decodable audio. - Thanks to BradleyS for bug report. - Thanks to J45 for sussing the issue. - Addresses http://forum.handbrake.fr/viewtopic.php?f=12&t=13149 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2953 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/Controller.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'macosx') diff --git a/macosx/Controller.m b/macosx/Controller.m index e23c90300..7960b2d52 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -6436,7 +6436,7 @@ return YES; hb_audio_config_t * audio; /* get the audio source audio codec */ audio = (hb_audio_config_t *) hb_list_audio_config_item( fTitle->list_audio, [trackLangPopUp indexOfSelectedItem] - 1 ); - if ([[tempObject objectForKey:@"AudioEncoder"] isEqualToString:@"AC3 Passthru"] && audio->in.codec != HB_ACODEC_AC3 || + if (audio != NULL && [[tempObject objectForKey:@"AudioEncoder"] isEqualToString:@"AC3 Passthru"] && audio->in.codec != HB_ACODEC_AC3 || [[tempObject objectForKey:@"AudioEncoder"] isEqualToString:@"DTS Passthru"] && audio->in.codec != HB_ACODEC_DCA ) { /* We have a preset using ac3 passthru but no ac3 source audio, so set the track to "None" and bail */ -- cgit v1.2.3