diff gui/win32/interface.c @ 37091:ec312b34e302

Fix segmentation fault. This would occur when there is no audio. (This should have been part of r37186 but is missing there.)
author ib
date Wed, 07 May 2014 14:03:40 +0000
parents b28b632efeef
children 4eeb8a38a971
line wrap: on
line diff
--- a/gui/win32/interface.c	Wed May 07 13:54:28 2014 +0000
+++ b/gui/win32/interface.c	Wed May 07 14:03:40 2014 +0000
@@ -625,8 +625,13 @@
         case GUI_SET_AUDIO:
         {
             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;
             if (sh_audio && !guiInfo.sh_video) guiInfo.VideoWindow = FALSE;
             if(IsWindowVisible(mygui->videowindow) && !guiInfo.VideoWindow)