diff --git a/src/plugins/qmlprofiler/qmlprofilertool.cpp b/src/plugins/qmlprofiler/qmlprofilertool.cpp index 31519b6edde..7d11326cb68 100644 --- a/src/plugins/qmlprofiler/qmlprofilertool.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertool.cpp @@ -533,7 +533,8 @@ QWidget *QmlProfilerTool::createWidgets() void QmlProfilerTool::connectClient(int port) { - QTC_ASSERT(!d->m_client, return;) + if (d->m_client) + delete d->m_client; d->m_client = new QDeclarativeDebugConnection; d->m_traceWindow->reset(d->m_client); connect(d->m_client, SIGNAL(stateChanged(QAbstractSocket::SocketState)),