summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-05-23 11:28:57 -0300
committerRenato Filho <renato.filho@openbossa.org>2011-05-23 17:43:35 -0300
commit05431cbfc03a815d0f56e63728dca4b8e4a52d0a (patch)
treecdd80ec1b534e0e3ffde4c6b926b7eba50a488a6
parent1abf8c614933d4e3fdc5cd067191637fa8baad72 (diff)
downloadpyside-05431cbfc03a815d0f56e63728dca4b8e4a52d0a.tar.gz
pyside-05431cbfc03a815d0f56e63728dca4b8e4a52d0a.tar.xz
pyside-05431cbfc03a815d0f56e63728dca4b8e4a52d0a.zip
Fixed reference leek on global receiver callback call.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Hugo Parente Lima <hugo.pl@gmail.com>
-rw-r--r--libpyside/globalreceiver.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libpyside/globalreceiver.cpp b/libpyside/globalreceiver.cpp
index a9390d7..1fb30d0 100644
--- a/libpyside/globalreceiver.cpp
+++ b/libpyside/globalreceiver.cpp
@@ -233,7 +233,8 @@ int GlobalReceiver::qt_metacall(QMetaObject::Call call, int id, void** args)
QList<QByteArray> paramTypes = slot.parameterTypes();
Shiboken::AutoDecRef preparedArgs(PyTuple_New(paramTypes.count()));
for (int i = 0, max = paramTypes.count(); i < max; ++i) {
- PyObject* arg = Shiboken::TypeResolver::get(paramTypes[i].constData())->toPython(args[i+1]);
+ PyObject* arg = Shiboken::TypeResolver::get(paramTypes[i].constData())->toPython(args[i+1]); // Do not increment the reference
+ Py_INCREF(arg);
PyTuple_SET_ITEM(preparedArgs.object(), i, arg);
}