diff options
author | johndoe123 | 2013-05-05 12:07:49 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-05-08 21:02:00 +0200 |
commit | fb0332d8842d7a87435f80a54c91a3a8b324bc8e (patch) | |
tree | 7a0ceb0a646e468f2bf7f710c956e37615d21f92 /engines | |
parent | 163023a8ed85b68ed877e1f3bf2e16cb1ef86862 (diff) | |
download | scummvm-rg350-fb0332d8842d7a87435f80a54c91a3a8b324bc8e.tar.gz scummvm-rg350-fb0332d8842d7a87435f80a54c91a3a8b324bc8e.tar.bz2 scummvm-rg350-fb0332d8842d7a87435f80a54c91a3a8b324bc8e.zip |
NEVERHOOD: Fix deletes in SpriteResource::unload() and ResourceMan::purgeResources()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/neverhood/resource.cpp | 1 | ||||
-rw-r--r-- | engines/neverhood/resourceman.cpp | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/engines/neverhood/resource.cpp b/engines/neverhood/resource.cpp index 22a802807b..442713196e 100644 --- a/engines/neverhood/resource.cpp +++ b/engines/neverhood/resource.cpp @@ -63,7 +63,6 @@ bool SpriteResource::load(uint32 fileHash, bool doLoadPosition) { void SpriteResource::unload() { _vm->_res->unloadResource(_resourceHandle); - delete[] _pixels; _pixels = NULL; _rle = false; } diff --git a/engines/neverhood/resourceman.cpp b/engines/neverhood/resourceman.cpp index f662130ea8..d5e7786c17 100644 --- a/engines/neverhood/resourceman.cpp +++ b/engines/neverhood/resourceman.cpp @@ -119,7 +119,7 @@ void ResourceMan::purgeResources() { for (Common::HashMap<uint32, ResourceData*>::iterator it = _data.begin(); it != _data.end(); ++it) { ResourceData *resourceData = (*it)._value; if (resourceData->dataRefCount == 0) { - delete resourceData->data; + delete[] resourceData->data; resourceData->data = NULL; } } |