From: curt Date: Wed, 15 Sep 2004 15:28:14 +0000 (+0000) Subject: Fix another case where the direction vector is not initialized which can X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=04e3b0b3c1162f54143e467d6f3a028952aa6e77;p=simgear.git Fix another case where the direction vector is not initialized which can lead to openal "inrange" assertions, crashing FlightGear. --- diff --git a/simgear/sound/sample_openal.cxx b/simgear/sound/sample_openal.cxx index 27fc9883..e0aeb9a8 100644 --- a/simgear/sound/sample_openal.cxx +++ b/simgear/sound/sample_openal.cxx @@ -160,6 +160,7 @@ SGSoundSample::SGSoundSample( unsigned char *_data, int len, int _freq, source_pos[0] = 0.0; source_pos[1] = 0.0; source_pos[2] = 0.0; offset_pos[0] = 0.0; offset_pos[1] = 0.0; offset_pos[2] = 0.0; source_vel[0] = 0.0; source_vel[1] = 0.0; source_vel[2] = 0.0; + direction[0] = 0.0; direction[1] = 0.0; direction[2] = 0.0; inner = outer = 360.0; outergain = 0.0; // clear errors from elsewhere?