diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2018-01-08 15:19:27 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2018-01-08 14:50:49 +0000 |
commit | da1453a13d529e7d63e26f92e7f8cecfc5c2a077 (patch) | |
tree | 4d92433afd73a2f8b06dbeaffc26ec3e0d0f0715 | |
parent | 38d5c585afa65159746703c3a12c94410810981c (diff) |
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>
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp index c309dc6f12..46d7bfa756 100644 --- a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp +++ b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp @@ -137,7 +137,10 @@ void QmlProfilerRunner::start() void QmlProfilerRunner::stop() { - QTC_ASSERT(d->m_profilerState, return); + if (!d->m_profilerState) { + reportStopped(); + return; + } switch (d->m_profilerState->currentState()) { case QmlProfilerStateManager::AppRunning: |