avoid crash when game engine returns to Blender, and OpenAL sources haven't been initialized properly for some reason.

This commit is contained in:
Erwin Coumans 2008-09-13 05:24:52 +00:00
parent 21d74deda6
commit 206cfe7955

@ -294,6 +294,10 @@ SND_OpenALDevice::SND_OpenALDevice()
// let openal generate its sources
if (alc_error == ALC_NO_ERROR)
{
int i;
for (i=0;i<NUM_SOURCES;i++)
m_sources[i] = 0;
alGenSources(NUM_SOURCES, m_sources);
m_sourcesinitialized = true;
}