mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
if mgr invalid, return nullsound
This commit is contained in:
parent
1cf37a11c5
commit
87fd0601c9
@ -26,6 +26,7 @@
|
||||
#include "config_util.h"
|
||||
#include "config_express.h"
|
||||
#include "virtualFileSystem.h"
|
||||
#include "nullAudioSound.h"
|
||||
#include <algorithm>
|
||||
|
||||
int MilesAudioManager::_active_managers = 0;
|
||||
@ -256,6 +257,12 @@ load(Filename file_name) {
|
||||
PT(AudioSound) MilesAudioManager::
|
||||
get_sound(const string& file_name) {
|
||||
audio_debug("MilesAudioManager::get_sound(file_name=\""<<file_name<<"\")");
|
||||
|
||||
if(!is_valid()) {
|
||||
audio_debug("invalid MilesAudioManager returning NullSound");
|
||||
return new NullAudioSound();
|
||||
}
|
||||
|
||||
assert(is_valid());
|
||||
Filename path = file_name;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user