From 4399383781da7ead66ddc844502aeaa06dd8157f Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 26 Apr 2004 22:07:19 +0000 Subject: [PATCH] Oops, one addtional tweak. --- simgear/sound/sample_openal.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/simgear/sound/sample_openal.cxx b/simgear/sound/sample_openal.cxx index 6cc22836..7a84e78d 100644 --- a/simgear/sound/sample_openal.cxx +++ b/simgear/sound/sample_openal.cxx @@ -63,6 +63,7 @@ static void print_openal_error( ALuint error ) { // constructor SGSoundSample::SGSoundSample( const char *path, const char *file, bool cleanup ) : + data(NULL), pitch(1.0), volume(1.0), loop(AL_FALSE) @@ -133,6 +134,7 @@ SGSoundSample::SGSoundSample( const char *path, const char *file, // constructor SGSoundSample::SGSoundSample( unsigned char *_data, int len, int _freq ) : + data(NULL), pitch(1.0), volume(1.0), loop(AL_FALSE) @@ -177,7 +179,7 @@ SGSoundSample::SGSoundSample( unsigned char *_data, int len, int _freq ) : SGSoundSample::~SGSoundSample() { SG_LOG( SG_GENERAL, SG_INFO, "Deleting a sample" ); if ( data != NULL ) { - delete data; + free(data); } alDeleteSources(1, &source); alDeleteBuffers(1, &buffer); -- 2.39.5