Fix crash when launching doom classic game

Nulling XAUDIO2_VOICE_STATE struct before using, so it's eliminate "uninitializing variable" crash when pMusicSourceVoice is NULL.
This commit is contained in:
Lightwave 2016-07-18 22:32:09 +03:00 committed by GitHub
parent 259d71da41
commit 65a44fe5ad

View file

@ -957,7 +957,7 @@ void I_PlaySong( const char *songname, int looping)
bool isStopped = false;
int d = 0;
while ( !isStopped ) {
XAUDIO2_VOICE_STATE test;
XAUDIO2_VOICE_STATE test = {};
if ( pMusicSourceVoice != NULL ) {
pMusicSourceVoice->GetState( &test );