forked from qt-creator/qt-creator
LanguageClient: fix leak on restarting crashed client
Change-Id: I3107d0afc81e1511c5ca643919d074226f221170 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -110,6 +110,10 @@ StdIOClientInterface::~StdIOClientInterface()
|
||||
|
||||
void StdIOClientInterface::startImpl()
|
||||
{
|
||||
if (m_process) {
|
||||
QTC_ASSERT(!m_process->isRunning(), m_process->stopProcess() );
|
||||
delete m_process;
|
||||
}
|
||||
m_process = new Utils::QtcProcess;
|
||||
m_process->setProcessMode(ProcessMode::Writer);
|
||||
connect(m_process, &QtcProcess::readyReadStandardError,
|
||||
|
||||
Reference in New Issue
Block a user