Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorErwin Coumans <blender@erwincoumans.com>2008-09-13 09:24:52 +0400
committerErwin Coumans <blender@erwincoumans.com>2008-09-13 09:24:52 +0400
commit206cfe7955683ac166201e417977e933fd98f7b3 (patch)
treedb9cfb63951b73d347a477e512a98942083f1446 /intern
parent21d74deda6a26433ba36e5751ca74f0a162f3279 (diff)
avoid crash when game engine returns to Blender, and OpenAL sources haven't been initialized properly for some reason.
Diffstat (limited to 'intern')
-rw-r--r--intern/SoundSystem/openal/SND_OpenALDevice.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/intern/SoundSystem/openal/SND_OpenALDevice.cpp b/intern/SoundSystem/openal/SND_OpenALDevice.cpp
index 82ed1c8a808..c660e9aecba 100644
--- a/intern/SoundSystem/openal/SND_OpenALDevice.cpp
+++ b/intern/SoundSystem/openal/SND_OpenALDevice.cpp
@@ -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;
}