fix crash in SamplePlayer, closes #5005

This commit is contained in:
Juan Linietsky 2016-06-11 21:18:19 -03:00
parent 3c21827d13
commit ef9720c8f0
1 changed files with 2 additions and 2 deletions

View File

@ -290,7 +290,7 @@ void SamplePlayer::stop_all() {
#define _GET_VOICE\
uint32_t voice=p_voice&0xFFFF;\
ERR_FAIL_COND(voice > (uint32_t)voices.size());\
ERR_FAIL_COND(voice >= (uint32_t)voices.size());\
Voice &v=voices[voice];\
if (v.check!=uint32_t(p_voice>>16))\
return;\
@ -381,7 +381,7 @@ void SamplePlayer::set_reverb(VoiceID p_voice,ReverbRoomType p_room,float p_send
#define _GET_VOICE_V(m_ret)\
uint32_t voice=p_voice&0xFFFF;\
ERR_FAIL_COND_V(voice > (uint32_t)voices.size(),m_ret);\
ERR_FAIL_COND_V(voice >= (uint32_t)voices.size(),m_ret);\
const Voice &v=voices[voice];\
if (v.check!=(p_voice>>16))\
return m_ret;\