From 99da91fc567244325a4b98ba515875f1fd035a9d Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 4 Feb 2020 11:58:23 +0100 Subject: [PATCH] Qmake: Don't access never set QMakePriFile::m_buildSystem Change-Id: I97e8f0c2b2e53a798bf2762324b4affab99fc938 Reviewed-by: Christian Kandeler --- src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp index 4aec1f02049..bf9f3f7e5ca 100644 --- a/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp +++ b/src/plugins/qmakeprojectmanager/qmakeparsernodes.cpp @@ -411,8 +411,11 @@ void QmakePriFile::watchFolders(const QSet &folders) QSet toWatch = folderStrings; toWatch.subtract(m_watchedFolders); - m_buildSystem->unwatchFolders(Utils::toList(toUnwatch), this); - m_buildSystem->watchFolders(Utils::toList(toWatch), this); + if (m_buildSystem) { + // Check needed on early exit of QmakeProFile::applyEvaluate? + m_buildSystem->unwatchFolders(Utils::toList(toUnwatch), this); + m_buildSystem->watchFolders(Utils::toList(toWatch), this); + } m_watchedFolders = folderStrings; }