Skip to content

Commit

Permalink
BLADERUNNER: Fix memory leaks in Script
Browse files Browse the repository at this point in the history
  • Loading branch information
madmoose authored and sev- committed Sep 29, 2016
1 parent 2a60ddf commit 97207bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engines/bladerunner/script/script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ bool Script::open(const Common::String &name) {
return false;
}

Script::~Script() {
delete _currentScript;
}

void Script::InitializeScene() {
_inScriptCounter++;
_currentScript->InitializeScene();
Expand Down
1 change: 1 addition & 0 deletions engines/bladerunner/script/script.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class Script {
_inScriptCounter(0),
_currentScript(nullptr)
{}
~Script();

bool open(const Common::String &name);

Expand Down

0 comments on commit 97207bf

Please sign in to comment.