Fix leaking dummy sfx buffer

This commit is contained in:
Benau 2018-07-07 10:56:11 +08:00
parent 622f46d95a
commit 21842f78d8

View File

@ -679,6 +679,8 @@ SFXBase* SFXManager::createSoundSource(SFXBuffer* buffer,
SFXBase* sfx = new SFXOpenAL(buffer, positional, buffer->getGain(), owns_buffer);
#else
SFXBase* sfx = new DummySFX(buffer, positional, buffer->getGain());
if (owns_buffer)
delete buffer;
#endif
sfx->setMasterVolume(m_master_gain);