diff options
Diffstat (limited to 'engines/cge/cge.cpp')
-rw-r--r-- | engines/cge/cge.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/engines/cge/cge.cpp b/engines/cge/cge.cpp index 603352d8a0..2a4ea6bea2 100644 --- a/engines/cge/cge.cpp +++ b/engines/cge/cge.cpp @@ -99,6 +99,12 @@ void CGEEngine::initCaveValues() { } } +void CGEEngine::freeCaveValues() { + delete[] _mini; + free(_heroXY); + free(_barriers); +} + void CGEEngine::setup() { debugC(1, kCGEDebugEngine, "CGEEngine::setup()"); @@ -209,10 +215,8 @@ CGEEngine::~CGEEngine() { delete _snail; delete _snail_; delete _hero; - delete[] _mini; - free(_heroXY); - free(_barriers); + freeCaveValues(); } Common::Error CGEEngine::run() { |