Browse Source

Also guard against accessing plRegistryKeyList currently being deleted

Co-authored-by: Adam Johnson <AdamJohnso@gmail.com>

(ported from H-uru/Plasma@725eeaa28820423f8f36e3476d0f5c6da30921c2)
tickets/51/51/1
dgelessus 2 years ago
parent
commit
5d5ba00f7d
  1. 2
      Sources/Plasma/PubUtilLib/plResMgr/plRegistryKeyList.cpp
  2. 2
      Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp

2
Sources/Plasma/PubUtilLib/plResMgr/plRegistryKeyList.cpp

@ -60,8 +60,8 @@ plRegistryKeyList::~plRegistryKeyList()
{
plKeyImp* keyImp = fStaticKeys[i];
if (keyImp && !keyImp->ObjectIsLoaded()) {
delete keyImp;
keyImp = nullptr;
delete keyImp;
}
}
}

2
Sources/Plasma/PubUtilLib/plResMgr/plRegistryNode.cpp

@ -203,8 +203,8 @@ void plRegistryPageNode::UnloadKeys()
for (; it != fKeyLists.end(); it++)
{
plRegistryKeyList* keyList = it->second;
delete keyList;
it->second = nullptr;
delete keyList;
}
fKeyLists.clear();

Loading…
Cancel
Save