forked from qt-creator/qt-creator
Avoid soft assert when closing an already stopped run control tab
Change-Id: I1d39d6450ab32a3d1e75c120b85362806bb2a60e Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -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...
|
||||
|
||||
Reference in New Issue
Block a user