mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-25 13:42:37 +00:00
SAGA: Fix memory leak in Mac version of IHNM
CID 1004123. Unfortunately, I do not have this version of the game so I cannot verify that this fix is correct, but it should be.
This commit is contained in:
parent
81f5a89093
commit
b77a516414
@ -104,6 +104,15 @@ SndRes::SndRes(SagaEngine *vm) : _vm(vm), _sfxContext(NULL), _voiceContext(NULL)
|
||||
}
|
||||
}
|
||||
|
||||
SndRes::~SndRes() {
|
||||
#ifdef ENABLE_IHNM
|
||||
if (_vm->getGameId() == GID_IHNM && _vm->isMacResources()) {
|
||||
// Delete the dummy voice context. See setVoiceBank()
|
||||
delete _voiceContext;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void SndRes::setVoiceBank(int serial) {
|
||||
Common::File *file;
|
||||
if (_voiceSerial == serial)
|
||||
|
@ -39,6 +39,7 @@ class SndRes {
|
||||
public:
|
||||
|
||||
SndRes(SagaEngine *vm);
|
||||
~SndRes();
|
||||
|
||||
void playSound(uint32 resourceId, int volume, bool loop);
|
||||
void playVoice(uint32 resourceId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user