[Scummvm-cvs-logs] scummvm master -> f2d5f65d3344d82964387ef110637328cc7b3a9b
urukgit
urukgit at users.noreply.github.com
Sun Apr 13 10:14:27 CEST 2014
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f2d5f65d33 AVALANCHE: Fix Ghostroom's destructor.
Commit: f2d5f65d3344d82964387ef110637328cc7b3a9b
https://github.com/scummvm/scummvm/commit/f2d5f65d3344d82964387ef110637328cc7b3a9b
Author: uruk (koppirnyo at gmail.com)
Date: 2014-04-13T10:13:48+02:00
Commit Message:
AVALANCHE: Fix Ghostroom's destructor.
Changed paths:
engines/avalanche/ghostroom.cpp
diff --git a/engines/avalanche/ghostroom.cpp b/engines/avalanche/ghostroom.cpp
index 68e3c9b..16c79fd 100644
--- a/engines/avalanche/ghostroom.cpp
+++ b/engines/avalanche/ghostroom.cpp
@@ -71,27 +71,29 @@ GhostRoom::~GhostRoom() {
_greldet[j][i].free();
}
- for (int i = 0; i < 5; i++) {
- for (int j = 0; j < 2; j++) {
- for (int y = 0; y < 66; y++) {
- delete[] _ghost[i][j][y];
+ if (_wasLoaded) {
+ for (int i = 0; i < 5; i++) {
+ for (int j = 0; j < 2; j++) {
+ for (int y = 0; y < 66; y++) {
+ delete[] _ghost[i][j][y];
+ }
+ delete[] _ghost[i][j];
}
- delete[] _ghost[i][j];
+ delete[] _ghost[i];
}
- delete[] _ghost[i];
- }
- delete[] _ghost;
-
- for (int i = 0; i < 6; i++) {
- for (int j = 0; j < 4; j++) {
- for (int y = 0; y < 35; y++) {
- delete[] _glerk[i][j][y];
+ delete[] _ghost;
+
+ for (int i = 0; i < 6; i++) {
+ for (int j = 0; j < 4; j++) {
+ for (int y = 0; y < 35; y++) {
+ delete[] _glerk[i][j][y];
+ }
+ delete[] _glerk[i][j];
}
- delete[] _glerk[i][j];
+ delete[] _glerk[i];
}
- delete[] _glerk[i];
+ delete[] _glerk;
}
- delete[] _glerk;
}
void GhostRoom::wait(uint16 howLong) {
More information about the Scummvm-git-logs
mailing list