diff options
author | Renato Filho <renato.filho@openbossa.org> | 2010-06-22 18:08:25 -0300 |
---|---|---|
committer | Renato Filho <renato.filho@openbossa.org> | 2010-06-23 11:00:37 -0300 |
commit | b1f7791a7257b0fb5a766cd1825fb32d52403bee (patch) | |
tree | 1dd325239226ad3745c1b33b2318fb0b58f05dc1 /PySide | |
parent | 09cb758d9ecfa21f4b8c5b73a43ce05ca6ee0492 (diff) |
Check for invalid signal or slot name.
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org>,
Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'PySide')
-rw-r--r-- | PySide/QtCore/glue/qobject_connect.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/PySide/QtCore/glue/qobject_connect.cpp b/PySide/QtCore/glue/qobject_connect.cpp index e9de41144..535dd10da 100644 --- a/PySide/QtCore/glue/qobject_connect.cpp +++ b/PySide/QtCore/glue/qobject_connect.cpp @@ -25,6 +25,9 @@ static bool getReceiver(PyObject *callback, QObject **receiver, PyObject **self) static bool qobjectConnect(QObject* source, const char* signal, QObject* receiver, const char* slot, Qt::ConnectionType type) { + if (!signal || !slot) + return false; + if (!PySide::checkSignal(signal)) return false; signal++; @@ -39,7 +42,7 @@ static bool qobjectConnect(QObject* source, const char* signal, QObject* receive static bool qobjectConnectCallback(QObject* source, const char* signal, PyObject* callback, Qt::ConnectionType type) { - if (!PySide::checkSignal(signal)) + if (!signal || !PySide::checkSignal(signal)) return false; signal++; |