diff options
Diffstat (limited to 'src/sound_openal.cpp')
-rw-r--r-- | src/sound_openal.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sound_openal.cpp b/src/sound_openal.cpp index 4f056888b..edcb9e8d4 100644 --- a/src/sound_openal.cpp +++ b/src/sound_openal.cpp @@ -454,6 +454,8 @@ public: int playSound(const std::string &name, bool loop, float volume) { maintain(); + if(name == "") + return 0; SoundBuffer *buf = getFetchBuffer(name); if(!buf){ infostream<<"OpenALSoundManager: \""<<name<<"\" not found." @@ -465,6 +467,8 @@ public: int playSoundAt(const std::string &name, bool loop, float volume, v3f pos) { maintain(); + if(name == "") + return 0; SoundBuffer *buf = getFetchBuffer(name); if(!buf){ infostream<<"OpenALSoundManager: \""<<name<<"\" not found." |