From 03d3646f8463cddddb17f043b7b827be1ca1bb39 Mon Sep 17 00:00:00 2001 From: richiesams Date: Thu, 29 Aug 2013 02:06:24 -0500 Subject: 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. --- engines/zvision/lever_control.cpp | 5 ++--- 1 file 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) { -- cgit v1.2.3