changeset 37090:91628537e24e

Fix segmentation fault. This would occur when there is no audio.
author ib
date Wed, 07 May 2014 13:54:28 +0000
parents 86893b300a45
children ec312b34e302
files gui/interface.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gui/interface.c	Tue May 06 19:02:03 2014 +0000
+++ b/gui/interface.c	Wed May 07 13:54:28 2014 +0000
@@ -810,8 +810,11 @@
 
         sh_audio = data;
 
+        if (sh_audio) {
         ad = sh_audio->ad_driver;
         guiInfo.AudioPassthrough = (gstrcmp(ad->info->short_name, "hwac3") == 0);
+        } else
+            guiInfo.AudioPassthrough = False;
 
         guiInfo.AudioChannels = (sh_audio ? sh_audio->channels : 0);