QmlProfiler: Allow QmlProfilerRunner::stop() without profilerState

This can happen because a run control may already initiateStop when in
Starting state.

Change-Id: Ie872cb1ba5d0ff65eb1c82ff90f9659311e534f4
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Ulf Hermann
2018-01-08 15:19:27 +01:00
parent 38d5c585af
commit da1453a13d

View File

@@ -137,7 +137,10 @@ void QmlProfilerRunner::start()
void QmlProfilerRunner::stop() void QmlProfilerRunner::stop()
{ {
QTC_ASSERT(d->m_profilerState, return); if (!d->m_profilerState) {
reportStopped();
return;
}
switch (d->m_profilerState->currentState()) { switch (d->m_profilerState->currentState()) {
case QmlProfilerStateManager::AppRunning: case QmlProfilerStateManager::AppRunning: