BGE C++ API

PyObjectPlus::ProcessReplica() is now called when any of its subclasses are replicated.

This is important because PyObjectPlus::ProcessReplica() NULL's the 'm_proxy' python pointer I added recently.
Without this a replicated subclass of PyObjectPlus could have an invalid pointer (crashing the BGE).

This change also means CValue::AddDataToReplica() can be moved into CValue::ProcessReplica() since ProcessReplica is always called.
This commit is contained in:
Campbell Barton
2009-04-22 14:42:00 +00:00
parent a8592d09d0
commit 5553d2c014
61 changed files with 63 additions and 140 deletions

View File

@@ -311,7 +311,7 @@ const STR_String & CIntValue::GetText()
CValue* CIntValue::GetReplica() {
CIntValue* replica = new CIntValue(*this);
CValue::AddDataToReplica(replica);
replica->ProcessReplica();
replica->m_pstrRep = NULL;
return replica;