diff --git a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp index e4a6635b3b5..f3d20cb8941 100644 --- a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp @@ -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(); }