diff --git a/simgear/sound/soundmgr_openal.cxx b/simgear/sound/soundmgr_openal.cxx index f7199458..692c7868 100644 --- a/simgear/sound/soundmgr_openal.cxx +++ b/simgear/sound/soundmgr_openal.cxx @@ -102,7 +102,7 @@ void SGSoundMgr::init(const char *devname) { ALCdevice *device = alcOpenDevice(devname); if ( testForError(device, "Audio device not available, trying default") ) { - ALCdevice *device = alcOpenDevice(NULL); + device = alcOpenDevice(NULL); if (testForError(device, "Default Audio device not available.") ) { return; }