Fixed crash when using machine with no sound card

This commit is contained in:
ansstuff 2011-11-26 14:08:00 +00:00
parent 15babdf0cd
commit 5c9bed56c9
1 changed files with 5 additions and 2 deletions

View File

@ -192,8 +192,8 @@ OAKRA_Voice *OAKRA_Module_OutputDS::getVoice(OAKRA_Format &format) {
if(voice->dead)
{
delete voice;
}
else
voice = 0;
} else
{
((Data *)data)->voices.push_back(voice);
}
@ -212,7 +212,10 @@ void OAKRA_Module_OutputDS::freeVoiceInternal(OAKRA_Voice *voice, bool internal)
if(j!=-1)
data->voices.erase(data->voices.begin()+j);
if(!internal)
{
delete voice;
voice = 0;
}
unlock();
}