git-svn-id: http://supertux.lethargik.org/svn/supertux/trunk/supertux@6539
837edb03-e0f3-0310-88ca-
d4d4e8b29345
sound_enabled = true;
music_enabled = true;
} catch(std::exception& e) {
- if(context != NULL)
+ if(context != NULL) {
alcDestroyContext(context);
- context = NULL;
- if(device != NULL)
+ context = NULL;
+ }
+ if(device != NULL) {
alcCloseDevice(device);
- device = NULL;
+ device = NULL;
+ }
log_warning << "Couldn't initialize audio device: " << e.what() << std::endl;
print_openal_version();
}
if(context != NULL) {
alcDestroyContext(context);
+ context = NULL;
}
if(device != NULL) {
alcCloseDevice(device);
+ device = NULL;
}
}
} else {
if(music_source) {
delete music_source;
- music_source = 0;
+ music_source = NULL;
}
}
}