summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordynaflash <[email protected]>2009-11-22 06:20:01 +0000
committerdynaflash <[email protected]>2009-11-22 06:20:01 +0000
commit65274c64811df91e83f6552bfcda852704df952d (patch)
tree4bc25815ae43f219f0d367b7df01aa7204abeaab
parent96a7d55eb6c5d800af1f2a2c181f7724721f4e08 (diff)
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
-rw-r--r--macosx/Controller.m2
1 files changed, 1 insertions, 1 deletions
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 */