summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2011-09-07 11:47:16 -0300
committerRenato Filho <renato.filho@openbossa.org>2011-09-08 11:05:41 -0300
commit8ddf35dd1f3a773872afed39fb5be6abbb0809ca (patch)
treefe00bcd18f32b9c6de0b16ed9eb544fa189eef6e
parentd01f3bd04cf3bd764e8fdd4f291c9875aa449b60 (diff)
downloadpyside-8ddf35dd1f3a773872afed39fb5be6abbb0809ca.tar.gz
pyside-8ddf35dd1f3a773872afed39fb5be6abbb0809ca.tar.xz
pyside-8ddf35dd1f3a773872afed39fb5be6abbb0809ca.zip
Fixed segfault during the connection fail.
Reviewed by: Hugo Parente <hugo.lima@openbossa.org> Lauro Neto <lauro.neto@openbossa.org>
-rw-r--r--libpyside/pysidesignal.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libpyside/pysidesignal.cpp b/libpyside/pysidesignal.cpp
index 3308035..084fcef 100644
--- a/libpyside/pysidesignal.cpp
+++ b/libpyside/pysidesignal.cpp
@@ -378,10 +378,10 @@ PyObject* signalInstanceConnect(PyObject* self, PyObject* args, PyObject* kwds)
if (result == Py_True)
return result;
else
- Py_DECREF(result);
+ Py_XDECREF(result);
}
-
- PyErr_Format(PyExc_RuntimeError, "Fail to connect signal %s.", source->d->signature);
+ if (!PyErr_Occurred())
+ PyErr_Format(PyExc_RuntimeError, "Fail to connect signal %s.", source->d->signature);
return 0;
}