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; }