diff options
author | Chris Robinson <[email protected]> | 2014-01-01 07:33:48 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-01-01 07:33:48 -0800 |
commit | 7d94e9c52fc7023e7ef7ca036de02b6131ecc376 (patch) | |
tree | 53be273463e8e2621ab04899c7fb03932a24378a /OpenAL32 | |
parent | 0a5a08c0fb942e4db407f6eccc86c091dc7c362f (diff) |
Don't allow soundfonts with existing presets in alLoadSoundfontSOFT
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/alMidi.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/OpenAL32/alMidi.c b/OpenAL32/alMidi.c index 17384bcf..3bf0acc4 100644 --- a/OpenAL32/alMidi.c +++ b/OpenAL32/alMidi.c @@ -86,6 +86,11 @@ AL_API void AL_APIENTRY alLoadSoundfontSOFT(ALuint id, size_t(*cb)(ALvoid*,size_ WriteUnlock(&sfont->Lock); SET_ERROR_AND_GOTO(context, AL_INVALID_OPERATION, done); } + if(sfont->NumPresets > 0) + { + WriteUnlock(&sfont->Lock); + SET_ERROR_AND_GOTO(context, AL_INVALID_OPERATION, done); + } reader.cb = cb; reader.ptr = user; |