From cff2eb6052fffb1d8dfd9a78dbf5ff364a96f26d Mon Sep 17 00:00:00 2001 From: David Rose Date: Mon, 14 Jun 2010 17:33:43 +0000 Subject: [PATCH] Py_DECREF --- panda/src/ode/odeSpace.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/panda/src/ode/odeSpace.cxx b/panda/src/ode/odeSpace.cxx index b769909a66..dea976827e 100755 --- a/panda/src/ode/odeSpace.cxx +++ b/panda/src/ode/odeSpace.cxx @@ -265,7 +265,11 @@ near_callback(void *data, dGeomID o1, dGeomID o2) { if (!result) { odespace_cat.error() << "An error occurred while calling python function!\n"; PyErr_Print(); + } else { + Py_DECREF(result); } + Py_DECREF(p2); + Py_DECREF(p1); } #endif