forked from qt-creator/qt-creator
Finish the shell process on shutdown, before deleting it
Change-Id: I62f3754325da9141e5ab870ff4750109a836b092 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -193,7 +193,12 @@ class ShellThreadHandler : public QObject
|
||||
public:
|
||||
~ShellThreadHandler()
|
||||
{
|
||||
if (m_shell)
|
||||
if (!m_shell)
|
||||
return;
|
||||
if (m_shell->isRunning()) {
|
||||
m_shell->write("exit\n");
|
||||
m_shell->waitForFinished();
|
||||
}
|
||||
delete m_shell;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user