mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
minor refcount tweak
This commit is contained in:
parent
69e04be3af
commit
5a7bafe065
@ -390,7 +390,13 @@ handle_update_field() {
|
||||
DCClass *dclass = (DCClass *)PyInt_AsLong(dclass_this);
|
||||
Py_DECREF(dclass_this);
|
||||
|
||||
// It's a good idea to ensure the reference count to distobj is
|
||||
// raised while we call the update method--otherwise, the update
|
||||
// method might get into trouble if it tried to delete the
|
||||
// object from the doId2do map.
|
||||
Py_INCREF(distobj);
|
||||
dclass->receive_update(distobj, _di);
|
||||
Py_DECREF(distobj);
|
||||
}
|
||||
}
|
||||
#endif // HAVE_PYTHON
|
||||
|
Loading…
x
Reference in New Issue
Block a user