diff options
Diffstat (limited to 'engines/agi/agi_v2.cpp')
-rw-r--r-- | engines/agi/agi_v2.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/agi/agi_v2.cpp b/engines/agi/agi_v2.cpp index 1cd9126350..593ca40384 100644 --- a/engines/agi/agi_v2.cpp +++ b/engines/agi/agi_v2.cpp @@ -254,7 +254,8 @@ int AgiLoader_v2::loadResource(int t, int n) { data = loadVolRes(&_vm->_game.dirSound[n]); if (data != NULL) { - _vm->_game.sounds[n].rdata = data; + // Freeing of the raw resource from memory is delegated to the createFromRawResource-function + _vm->_game.sounds[n] = AgiSound::createFromRawResource(data, _vm->_game.dirSound[n].len, n, *_vm->_sound); _vm->_game.dirSound[n].flags |= RES_LOADED; } else { ec = errBadResource; |