From 43ce89224a7d28cf3f48bcd1bbebad1243a95ef5 Mon Sep 17 00:00:00 2001 From: Ramen2X Date: Mon, 25 Mar 2024 14:34:28 -0400 Subject: [PATCH] match LegoGameState::RegisterState() (#729) --- LEGO1/lego/legoomni/src/common/legogamestate.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/LEGO1/lego/legoomni/src/common/legogamestate.cpp b/LEGO1/lego/legoomni/src/common/legogamestate.cpp index 8c61bae7..b67763ee 100644 --- a/LEGO1/lego/legoomni/src/common/legogamestate.cpp +++ b/LEGO1/lego/legoomni/src/common/legogamestate.cpp @@ -1064,9 +1064,7 @@ void LegoGameState::RegisterState(LegoState* p_state) return; } - if (m_stateArray[targetIndex]) { - delete m_stateArray[targetIndex]; - } + delete m_stateArray[targetIndex]; m_stateArray[targetIndex] = p_state; }