aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2017-01-09 22:57:59 -0600
committerColin Snover2017-01-11 11:01:38 -0600
commit4eecd48c64792c327bb1e5e85f38b75717da0947 (patch)
tree2dede89207ca2784e4bcc6c813a0c344ebc0ef0d
parent7156a82a64dea2b2836d42b0d5bcffe4841eb40c (diff)
downloadscummvm-rg350-4eecd48c64792c327bb1e5e85f38b75717da0947.tar.gz
scummvm-rg350-4eecd48c64792c327bb1e5e85f38b75717da0947.tar.bz2
scummvm-rg350-4eecd48c64792c327bb1e5e85f38b75717da0947.zip
SCI32: Remove unnecessary call to unalloc
When the Resource is deleted, it will deallocate the memory, so it is not necessary to do that manually.
-rw-r--r--engines/sci/resource_audio.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/engines/sci/resource_audio.cpp b/engines/sci/resource_audio.cpp
index bd6eee3cca..f17a684cc9 100644
--- a/engines/sci/resource_audio.cpp
+++ b/engines/sci/resource_audio.cpp
@@ -987,9 +987,6 @@ void ResourceManager::changeAudioDirectory(const Common::String &path) {
if (resource->_status == kResStatusEnqueued) {
removeFromLRU(resource);
}
- if (resource->_status != kResStatusNoMalloc) {
- resource->unalloc();
- }
delete resource;
_resMap.erase(resIt);
}