ACCESS: Plug memory leak
This commit is contained in:
parent
33184e822d
commit
20433e3476
1 changed files with 2 additions and 1 deletions
|
@ -44,7 +44,7 @@ CharEntry::CharEntry(const byte *data, AccessEngine *vm) {
|
||||||
if (vm->getGameID() == GType_MartianMemorandum) {
|
if (vm->getGameID() == GType_MartianMemorandum) {
|
||||||
int lastColor = s.readUint16LE();
|
int lastColor = s.readUint16LE();
|
||||||
_numColors = lastColor - _startColor;
|
_numColors = lastColor - _startColor;
|
||||||
} else
|
} else
|
||||||
_numColors = s.readUint16LE();
|
_numColors = s.readUint16LE();
|
||||||
|
|
||||||
// Load cells
|
// Load cells
|
||||||
|
@ -131,6 +131,7 @@ void CharManager::loadChar(int charId) {
|
||||||
if (ce._animFile._fileNum != -1) {
|
if (ce._animFile._fileNum != -1) {
|
||||||
Resource *data = _vm->_files->loadFile(ce._animFile);
|
Resource *data = _vm->_files->loadFile(ce._animFile);
|
||||||
_vm->_animation->loadAnimations(data);
|
_vm->_animation->loadAnimations(data);
|
||||||
|
delete data;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load script data
|
// Load script data
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue