Commit eab3a245 authored by Filipe Azevedo's avatar Filipe Azevedo

Avoid soft assert when closing an already stopped run control tab

Change-Id: I1d39d6450ab32a3d1e75c120b85362806bb2a60e
Reviewed-by: default avatarhjk <hjk@qt.io>
parent b67bf73d
......@@ -568,7 +568,7 @@ void AppOutputPane::closeTab(int tabIndex, CloseTabMode closeTabMode)
// Prompt user to stop
if (closeTabMode == CloseTabWithPrompt) {
QWidget *tabWidget = m_tabWidget->widget(tabIndex);
if (!runControl->promptToStop())
if (runControl->isRunning() && !runControl->promptToStop())
return;
// The event loop has run, thus the ordering might have changed, a tab might
// have been closed, so do some strange things...
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment