From 754632401f3a06b38fb2616228fa8e33e86c0a8b Mon Sep 17 00:00:00 2001 From: sluicebox <22204938+sluicebox@users.noreply.github.com> Date: Wed, 20 Mar 2024 17:26:56 -0700 Subject: [PATCH] PINK: Remove delete nullptr. PVS-Studio V575 --- engines/pink/pda_mgr.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/engines/pink/pda_mgr.cpp b/engines/pink/pda_mgr.cpp index 1161052e107..eb55f6ab518 100644 --- a/engines/pink/pda_mgr.cpp +++ b/engines/pink/pda_mgr.cpp @@ -181,11 +181,9 @@ void PDAMgr::close() { } void PDAMgr::loadGlobal() { - if (_globalPage) - return; - - delete _globalPage; - _globalPage = new PDAPage("GLOBAL", getGame()); + if (_globalPage == nullptr) { + _globalPage = new PDAPage("GLOBAL", getGame()); + } } void PDAMgr::initPerilButtons() {