diff options
-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; } } |