Browse Source

Fix reference counting problem in pyVaultNode::AddNode().

This is fixed in H'uru via extensive use of RAII around vault nodes.
tickets/25/25/1
Adam Johnson 3 years ago
parent
commit
fd3b9ac5ec
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 3
      Sources/Plasma/FeatureLib/pfPython/pyVaultNode.cpp

3
Sources/Plasma/FeatureLib/pfPython/pyVaultNode.cpp

@ -441,7 +441,8 @@ PyObject* pyVaultNode::AddNode(pyVaultNode* pynode, PyObject* cbObject, UInt32 c
);
if (newNode) {
newNode->IncRef();
// No need to increment the newNode's reference count; the pynode
// will steal the current reference.
pynode->fNode->DecRef();
pynode->fNode = newNode;
}

Loading…
Cancel
Save