Fixes crash when ISAC audio backend isn't available.
@@ -255,6 +255,8 @@ bool sound_init() {
} else {
log_warnf("ISAC failed 0x%X, falling back to miniaudio!", hr);
}
+ delete isac_adapter;
+ isac_adapter = nullptr;
#endif
au_config = ma_device_config_init(ma_device_type_playback);
@@ -291,6 +293,7 @@ void sound_update() {
void sound_shutdown() {
ma_device_uninit (&au_device);
#ifdef _MSC_VER
+ if (isac_adapter)
delete isac_adapter;
#endif
}
