From b9a108f9cd29e87c8267441b727300f8583b9b1c Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 3 Oct 2006 01:07:41 +0000 Subject: [PATCH] protect against assertion --- panda/src/audiotraits/milesAudioManager.cxx | 30 ++++++++++++--------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/panda/src/audiotraits/milesAudioManager.cxx b/panda/src/audiotraits/milesAudioManager.cxx index 2150cacead..e2e3e58f63 100644 --- a/panda/src/audiotraits/milesAudioManager.cxx +++ b/panda/src/audiotraits/milesAudioManager.cxx @@ -104,21 +104,25 @@ MilesAudioManager() { // Load the downloadable sounds file: if (_dls_field == NULL) { - HDLSDEVICE dls; + HDLSDEVICE dls = NULL; AIL_quick_handles(0, 0, &dls); - nassertv(dls != NULL); - string dls_file = Filename(audio_dls_file).to_os_specific(); - if (dls_file.empty()) { - get_gm_file_path(dls_file); - // we need more dbg info in logs, so bumping the msgs from 'debug' status to 'info' status - audio_info(" using default dls_file: "<< dls_file ); + if (dls == NULL) { + audio_error(" Unable to open DLS. " << AIL_last_error()); + } else { + string dls_file = Filename(audio_dls_file).to_os_specific(); + if (dls_file.empty()) { + get_gm_file_path(dls_file); + // we need more dbg info in logs, so bumping the msgs from 'debug' status to 'info' status + audio_info(" using default dls_file: "<< dls_file ); + } + + audio_debug(" dls_file=\""<