At last I've found the reason why fgfs crashed routinely for me. When I still
used KDE's artsdsp (preloads lib with OSS replacement functions) I saw
this crash only occasionally. After letting OpenAl communicate with artsd
directly (by means of ~/.openalrc setting), I got the crash always when
I left fgfs.
This bug may also have crashed fgfs when running with sound daemons other than
aRts.
// initialize OpenAL
alutInit( 0, NULL );
- alGetError();
+ atexit(alutExit);
+
if ( alGetError() == AL_NO_ERROR) {
working = true;
} else {
SGSoundSample *sample = sample_current->second;
delete sample;
}
-
- alutExit();
}
{
_sample->stop();
- if (_property)
- delete _property;
-
- if (_condition)
- delete _condition;
+ delete _property;
+ delete _condition;
_volume.clear();
_pitch.clear();