Not sure why this INCREF is needed since making a replica wont use the m_bytecode so why should it add a user?

Removed in 19974 but that crashes YoFrankie so adding back in for now.
This commit is contained in:
Campbell Barton 2009-04-30 00:51:11 +00:00
parent a625f5e476
commit 1782be5c72

@ -96,7 +96,11 @@ SCA_PythonController::~SCA_PythonController()
CValue* SCA_PythonController::GetReplica()
{
SCA_PythonController* replica = new SCA_PythonController(*this);
// Copy the compiled bytecode if possible.
/* why is this needed at all??? - m_bytecode is NULL'd below so this doesnt make sense
* but removing it crashes blender (with YoFrankie). so leave in for now - Campbell */
Py_XINCREF(replica->m_bytecode);
Py_XINCREF(replica->m_function); // this is ok since its not set to NULL
replica->m_bModified = replica->m_bytecode == NULL;