Skip to content

Commit

Permalink
ZVISION: Cleanup.
Browse files Browse the repository at this point in the history
We usually don't check a pointer before deleting it.
  • Loading branch information
Torbjörn Andersson committed Jan 26, 2015
1 parent dd5cd42 commit 8c8261a
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions engines/zvision/scripting/actions.cpp
Expand Up @@ -79,8 +79,7 @@ ActionAssign::ActionAssign(ZVision *engine, int32 slotkey, const Common::String
}

ActionAssign::~ActionAssign() {
if (_value)
delete _value;
delete _value;
}

bool ActionAssign::execute() {
Expand Down Expand Up @@ -804,8 +803,7 @@ ActionRandom::ActionRandom(ZVision *engine, int32 slotkey, const Common::String
}

ActionRandom::~ActionRandom() {
if (_max)
delete _max;
delete _max;
}

bool ActionRandom::execute() {
Expand Down Expand Up @@ -1044,8 +1042,7 @@ ActionTimer::ActionTimer(ZVision *engine, int32 slotkey, const Common::String &l
}

ActionTimer::~ActionTimer() {
if (_time)
delete _time;
delete _time;
_engine->getScriptManager()->killSideFx(_slotKey);
}

Expand Down

0 comments on commit 8c8261a

Please sign in to comment.