Fix bug#563 - "Unhandled signal emitting with invalid signature (which leads to application crash)"

This commit is contained in:
Hugo Parente Lima 2010-12-28 14:50:46 -02:00
commit 92b893c532
5 changed files with 16 additions and 16 deletions

View file

@ -188,7 +188,7 @@ static bool emitNormalSignal(QObject* source, int signalIndex, const char* signa
Shiboken::AutoDecRef sequence(PySequence_Fast(args, 0));
int argsGiven = PySequence_Fast_GET_SIZE(sequence.object());
if (argsGiven > argTypes.count()) {
if (argsGiven != argTypes.count()) {
PyErr_Format(PyExc_TypeError, "%s only accepts %d arguments, %d given!", signal, argTypes.count(), argsGiven);
return false;
}