aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-05-23 11:28:57 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:54:25 -0300
commitd9c43275a09fc68146a210a9da281a9491d62980 (patch)
tree521abb056d490a67e4de6d440f0f232d8fc21d39
parent306395a65ffd72987dcbe50a1b5c29bc45b7ab2a (diff)
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 a9390d73d..1fb30d05e 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);
}