# HG changeset patch # User ib # Date 1387318693 0 # Node ID c9fb71a139bb004c69c92325310a85bd33122772 # Parent 9a28d5c4320af55a599c5fd4f7ea756e25006d38 Use variable for passed data in GUI_SET_AUDIO. This follows the other GUI_SET calls, and avoids the cast. diff -r 9a28d5c4320a -r c9fb71a139bb gui/interface.c --- a/gui/interface.c Tue Dec 17 22:12:19 2013 +0000 +++ b/gui/interface.c Tue Dec 17 22:18:13 2013 +0000 @@ -310,6 +310,7 @@ dvd_priv_t *dvd; #endif int msg, state; + sh_audio_t *sh_audio; mixer_t *mixer; plItem *next = NULL; @@ -688,9 +689,11 @@ case GUI_SET_AUDIO: - guiInfo.AudioChannels = data ? ((sh_audio_t *)data)->channels : 0; + sh_audio = data; - if (data && !guiInfo.sh_video) { + guiInfo.AudioChannels = sh_audio ? sh_audio->channels : 0; + + if (sh_audio && !guiInfo.sh_video) { guiInfo.VideoWindow = False; guiInfo.VideoWidth = 0; guiInfo.VideoHeight = 0;