QmakeProject: Fix crash on unloading project while parsing

Callign applyAsyncEvaluate in the desctructor might lead to further
parses, which we don't want. So bail out early in applyAsyncEvaluate.

Task-number: QTCREATORBUG-13421
Change-Id: I776ff477363a3985ebc26e9160c58c2ab9c910b7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Daniel Teske
2014-11-18 17:05:09 +01:00
parent 7f72b7bf65
commit f6a9d01ddf
4 changed files with 19 additions and 1 deletions

View File

@@ -2026,6 +2026,11 @@ void QmakeProFileNode::applyEvaluate(EvalResult *evalResult)
if (!m_readerExact)
return;
if (m_project->asyncUpdateState() == QmakeProject::ShuttingDown) {
cleanupProFileReaders();
return;
}
foreach (const QString &error, evalResult->errors)
QmakeProject::proFileParseError(error);
@@ -2258,6 +2263,11 @@ void QmakeProFileNode::applyEvaluate(EvalResult *evalResult)
updateUiFiles(buildDirectory);
cleanupProFileReaders();
}
void QmakeProFileNode::cleanupProFileReaders()
{
m_project->destroyProFileReader(m_readerExact);
m_project->destroyProFileReader(m_readerCumulative);