QmakeProjectManager: Fix null pointer access

Amends c7d8b9b01c.

Fixes: QTCREATORBUG-23596
Change-Id: I466907e02572008d0e677ff29ecd712969f8bc54
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2020-02-12 15:32:52 +01:00
parent 299d34d547
commit e46df080ee

View File

@@ -1203,12 +1203,13 @@ QmakeProFile::QmakeProFile(const FilePath &filePath) : QmakePriFile(filePath) {
QmakeProFile::~QmakeProFile()
{
qDeleteAll(m_extraCompilers);
m_parseFutureWatcher->cancel();
m_parseFutureWatcher->waitForFinished();
if (m_readerExact)
applyAsyncEvaluate();
delete m_parseFutureWatcher;
if (m_parseFutureWatcher) {
m_parseFutureWatcher->cancel();
m_parseFutureWatcher->waitForFinished();
if (m_readerExact)
applyAsyncEvaluate();
delete m_parseFutureWatcher;
}
cleanupProFileReaders();
}