Browse Source

Py_DECREF

David Rose 15 years ago
parent
commit
cff2eb6052
1 changed files with 4 additions and 0 deletions
  1. 4 0
      panda/src/ode/odeSpace.cxx

+ 4 - 0
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