aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@digia.com>2013-10-08 10:59:28 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-16 08:33:52 +0200
commit8c66618892334b4ef0b5ecced048f96d051352bd (patch)
tree0b5cbe77fcc8cc53415c92a25a275b242d4fc1f9 /tests
parentff28e3519dedb9bf0b4d1177b205b0b20cbec431 (diff)
Fix segfault in autotest
Do not re-declare variable in local scope! Change-Id: I4f66081603ce86d78965ac12368bda66d86ff0c4 Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
index 4cf8fa64c5..b6fab536de 100644
--- a/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
+++ b/tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
@@ -313,7 +313,7 @@ void tst_QQmlProfilerService::connect(bool block, const QString &testFile)
m_process->start(QStringList() << arguments);
QVERIFY2(m_process->waitForSessionStart(), "Could not launch application, or did not get 'Waiting for connection'.");
- QQmlDebugConnection *m_connection = new QQmlDebugConnection();
+ m_connection = new QQmlDebugConnection();
m_client = new QQmlProfilerClient(m_connection);
const int port = m_process->debugPort();
@@ -327,8 +327,11 @@ void tst_QQmlProfilerService::cleanup()
qDebug() << "Application Output:" << m_process->output();
}
delete m_process;
- delete m_connection;
+ m_process = 0;
delete m_client;
+ m_client = 0;
+ delete m_connection;
+ m_connection = 0;
}
void tst_QQmlProfilerService::blockingConnectWithTraceEnabled()