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() QmakeProFile::~QmakeProFile()
{ {
qDeleteAll(m_extraCompilers); qDeleteAll(m_extraCompilers);
m_parseFutureWatcher->cancel(); if (m_parseFutureWatcher) {
m_parseFutureWatcher->waitForFinished(); m_parseFutureWatcher->cancel();
if (m_readerExact) m_parseFutureWatcher->waitForFinished();
applyAsyncEvaluate(); if (m_readerExact)
delete m_parseFutureWatcher; applyAsyncEvaluate();
delete m_parseFutureWatcher;
}
cleanupProFileReaders(); cleanupProFileReaders();
} }