[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16495] trunk/blender/intern/SoundSystem/ openal/SND_OpenALDevice.cpp: avoid crash when game engine returns to Blender, and OpenAL sources haven' t been initialized properly for some reason.
Erwin Coumans
blender at erwincoumans.com
Sat Sep 13 07:24:52 CEST 2008
Revision: 16495
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16495
Author: erwin
Date: 2008-09-13 07:24:52 +0200 (Sat, 13 Sep 2008)
Log Message:
-----------
avoid crash when game engine returns to Blender, and OpenAL sources haven't been initialized properly for some reason.
Modified Paths:
--------------
trunk/blender/intern/SoundSystem/openal/SND_OpenALDevice.cpp
Modified: trunk/blender/intern/SoundSystem/openal/SND_OpenALDevice.cpp
===================================================================
--- trunk/blender/intern/SoundSystem/openal/SND_OpenALDevice.cpp 2008-09-12 21:07:25 UTC (rev 16494)
+++ trunk/blender/intern/SoundSystem/openal/SND_OpenALDevice.cpp 2008-09-13 05:24:52 UTC (rev 16495)
@@ -294,6 +294,10 @@
// 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;
}
More information about the Bf-blender-cvs
mailing list