Avoid segfaults if mockingboard not initialized

This commit is contained in:
Aaron Culliney 2015-07-04 18:11:12 -07:00
parent b717e829a7
commit 43f6eff62e

View File

@ -1679,7 +1679,7 @@ void MB_Initialize()
g_bMBAvailable = MB_DSInit();
if (!g_bMBAvailable) {
MockingboardVoice->bMute = true;
//MockingboardVoice->bMute = true;
g_SoundcardType = CT_Empty;
return;
}
@ -2085,6 +2085,10 @@ void MB_EndOfVideoFrame()
if(g_SoundcardType == CT_Empty)
return;
if (!g_bMBAvailable) {
return;
}
if(!g_bMBTimerIrqActive)
MB_Update();
}