Fix SEGFAULT caused by parameter going out of scope.

This commit is contained in:
Nathan Osman
2016-10-04 17:02:35 -07:00
parent 7edb26c433
commit feaab366ef

View File

@@ -47,6 +47,7 @@ QObjectHandlerPrivate::QObjectHandlerPrivate(QObjectHandler *handler)
void QObjectHandlerPrivate::invokeSlot(QHttpSocket *socket, int index, const QVariantMap &query)
{
QGenericArgument secondArgument;
QVariantMap parameters;
// If this is a POST request, then decode the request body
if (socket->method() == MethodPOST) {
@@ -61,7 +62,8 @@ void QObjectHandlerPrivate::invokeSlot(QHttpSocket *socket, int index, const QVa
return;
}
secondArgument = Q_ARG(QVariantMap, document.object().toVariantMap());
parameters = document.object().toVariantMap();
secondArgument = Q_ARG(QVariantMap, parameters);
}
// Attempt to invoke the slot