QmlProfiler: assert that connections are AnalyzerConnections

... before accessing them as AnalyzerConnection

Change-Id: I6f6111ca3b0dede93ac85fbcb5ffbfcf3c7b19aa
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2016-06-02 16:19:41 +02:00
parent 7d5d026244
commit 7ecd0763b9
2 changed files with 4 additions and 1 deletions

View File

@@ -251,8 +251,10 @@ void QmlProfilerRunControl::processIsRunning(Utils::Port port)
{
d->m_noDebugOutputTimer.stop();
if (!port.isValid())
if (!port.isValid()) {
QTC_ASSERT(connection().is<AnalyzerConnection>(), return);
port = connection().as<AnalyzerConnection>().analyzerPort;
}
if (port.isValid())
emit processRunning(port);
}