From da1453a13d529e7d63e26f92e7f8cecfc5c2a077 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 8 Jan 2018 15:19:27 +0100 Subject: [PATCH] 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 --- src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp b/src/plugins/qmlprofiler/qmlprofilerruncontrol.cpp index c309dc6f127..46d7bfa7563 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: