properly unset default mixer on engine destroy

fixes a segfault/broken assertion that could happen right before quiting
This commit is contained in:
Sebastian Krzyszkowiak 2019-04-22 01:34:53 +02:00
parent 26089d86e6
commit ddfe7cc50a
No known key found for this signature in database
GPG key ID: E8F235CF3BDBC3FF

View file

@ -525,7 +525,7 @@ SYMBOL_EXPORT void libsuperderpy_destroy(struct Game* game) {
al_destroy_display(game->display);
al_destroy_user_event_source(&(game->event_source));
al_destroy_event_queue(game->_priv.event_queue);
al_set_default_mixer(NULL); // does not destroy anything
al_restore_default_mixer();
al_destroy_mixer(game->audio.fx);
al_destroy_mixer(game->audio.music);
al_destroy_mixer(game->audio.voice);