aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2014-08-27 22:22:33 -0400
committerPaul Gilbert2014-08-27 22:22:33 -0400
commit35923890ccb26d958d33c6c472a1b16659718392 (patch)
treeb0f07e5bb5994ef60716461895be8983cf97dd53
parentc0a7852662be724077921bcf9b9bb0bf2da2dfff (diff)
downloadscummvm-rg350-35923890ccb26d958d33c6c472a1b16659718392.tar.gz
scummvm-rg350-35923890ccb26d958d33c6c472a1b16659718392.tar.bz2
scummvm-rg350-35923890ccb26d958d33c6c472a1b16659718392.zip
ACCESS: Fix incorrect use of delete[] on Resources
-rw-r--r--engines/access/access.cpp2
-rw-r--r--engines/access/room.cpp2
-rw-r--r--engines/access/sound.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/engines/access/access.cpp b/engines/access/access.cpp
index 080cd36032..7189ebb799 100644
--- a/engines/access/access.cpp
+++ b/engines/access/access.cpp
@@ -226,7 +226,7 @@ void AccessEngine::freeCells() {
}
void AccessEngine::freeInactiveData() {
- delete[] _inactive;
+ delete _inactive;
_inactive = nullptr;
}
diff --git a/engines/access/room.cpp b/engines/access/room.cpp
index 0c60f7b818..0de6497422 100644
--- a/engines/access/room.cpp
+++ b/engines/access/room.cpp
@@ -143,7 +143,7 @@ void Room::doRoom() {
void Room::clearRoom() {
if (_vm->_sound->_music) {
_vm->_sound->stopSong();
- delete[] _vm->_sound->_music;
+ delete _vm->_sound->_music;
_vm->_sound->_music = nullptr;
}
diff --git a/engines/access/sound.cpp b/engines/access/sound.cpp
index c032f6cfd2..bdf8c224e4 100644
--- a/engines/access/sound.cpp
+++ b/engines/access/sound.cpp
@@ -90,7 +90,7 @@ void SoundManager::freeSounds() {
}
void SoundManager::freeMusic() {
- delete[] _music;
+ delete _music;
_music = nullptr;
}