diff options
author | richiesams | 2013-08-29 02:06:24 -0500 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-09-24 13:59:39 +0200 |
commit | 03d3646f8463cddddb17f043b7b827be1ca1bb39 (patch) | |
tree | e37b940d80017e9a4389e094de82fd00a76f068f | |
parent | fa578497b3ceb745c31f789a40b95b4a15f1cbe0 (diff) | |
download | scummvm-rg350-03d3646f8463cddddb17f043b7b827be1ca1bb39.tar.gz scummvm-rg350-03d3646f8463cddddb17f043b7b827be1ca1bb39.tar.bz2 scummvm-rg350-03d3646f8463cddddb17f043b7b827be1ca1bb39.zip |
ZVISION: Remove unnecessary check if a pointer was non-NULL before deleting.
I found out that you can call delete/free/delete[] on NULL and the function's defined
behavior is to do nothing.
-rw-r--r-- | engines/zvision/lever_control.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/engines/zvision/lever_control.cpp b/engines/zvision/lever_control.cpp index 7d23b68768..45c21efd49 100644 --- a/engines/zvision/lever_control.cpp +++ b/engines/zvision/lever_control.cpp @@ -79,9 +79,8 @@ LeverControl::~LeverControl() { } else if (_fileType == RLF) { delete _animation.rlf; } - if (_frameInfo != 0) { - delete[] _frameInfo; - } + + delete[] _frameInfo; } void LeverControl::parseLevFile(const Common::String &fileName) { |