From ea7e4b2ab54872f59234fe1370aa83b84e711c40 Mon Sep 17 00:00:00 2001 From: dgelessus Date: Mon, 26 Jun 2023 00:09:03 +0200 Subject: [PATCH] Fix previous commits not actually nulling out the key I goofed while porting this from H'uru, where the variable is a reference. The previous code actually caused the keys to not get deleted at all. --- Sources/Plasma/PubUtilLib/plResMgr/plRegistryKeyList.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Plasma/PubUtilLib/plResMgr/plRegistryKeyList.cpp b/Sources/Plasma/PubUtilLib/plResMgr/plRegistryKeyList.cpp index 6f292d59..8ddcb962 100644 --- a/Sources/Plasma/PubUtilLib/plResMgr/plRegistryKeyList.cpp +++ b/Sources/Plasma/PubUtilLib/plResMgr/plRegistryKeyList.cpp @@ -60,7 +60,7 @@ plRegistryKeyList::~plRegistryKeyList() { plKeyImp* keyImp = fStaticKeys[i]; if (keyImp && !keyImp->ObjectIsLoaded()) { - keyImp = nullptr; + fStaticKeys[i] = nullptr; delete keyImp; } }